Re: pg_dump(all) --quote-all-identifiers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Hartmut Goebel <h(dot)goebel(at)goebel-consult(dot)de>
Subject: Re: pg_dump(all) --quote-all-identifiers
Date: 2010-06-14 11:15:33
Message-ID: AANLkTimHMG9bE6E1YdIUza1qP95m4l0HTCUUCUvBxXnO@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 14, 2010 at 6:57 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Robert Haas wrote:
>> In response to a complaint from Hartmut Goebel:
>>
>> http://archives.postgresql.org/pgsql-bugs/2010-06/msg00018.php
>>
>> And per a design proposed by Tom Lane:
>>
>> http://archives.postgresql.org/pgsql-bugs/2010-06/msg00211.php
>>
>> PFA a patch to implement $SUBJECT.  One interesting aspect of this
>> patch is that types like "integer" and "double precision" don't get
>> quoted in the output, whereas types like "text" do.  But it turns out
>> that types like "integer" and "double precision" don't *work* if
>> they're quoted, so this is not a bad thing.  It might possibly be
>> judged to require documentation somewhere, however.
>
> Uh, I thought this was about quoting the identifiers.  I am confused
> about why "integer" is an issue in this case.  Can you show an example?

Sure.

rhaas=# create table bruce (demonstration "integer");
ERROR: type "integer" does not exist
LINE 1: create table bruce (demonstration "integer");
^
rhaas=# create table bruce (demonstration integer);
CREATE TABLE

See gram.y, around line 8341.

Note that if you try the same example with "text" instead of
"integer", both variants work.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-06-14 11:18:06 Re: warning message in standby
Previous Message Bruce Momjian 2010-06-14 11:14:27 Re: Command Prompt 8.4.4 PRMs compiled with debug/assert enabled