Re: [COMMITTERS] pgsql: Arrange for quote_identifier() and pg_dump to not quote keywords

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)postgresql(dot)org>
Cc: "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Arrange for quote_identifier() and pg_dump to not quote keywords
Date: 2007-06-26 14:31:04
Message-ID: 874pkuiy8n.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

"Gregory Stark" <stark(at)enterprisedb(dot)com> writes:

> "Tom Lane" <tgl(at)postgresql(dot)org> writes:
>
>> For the moment, lie about WITH's status in the table so it will still get
>> quoted --- this is because of the expectation that WITH will become reserved
>> when the SQL recursive-queries patch gets done.
>
> Out of curiosity I'm checking what consequences some other future grammer
> changes might have for us.

Oh, and I forgot OVER (assuming we want to actually use the windows, not just
define them). It looks like OVER and also PARTITION can get by as
type_func_name_keyword.

So that gives us:

col_name_keyword:
CUBE
ROLLUP

type_func_name_keyword:
OVER
PARTITION

reserved_keyword:
ROWS
WINDOW
RANGE

unreserved_keyword:
GROUPING
SETS
PRECEDING
FOLLOWING
OTHERS
UNBOUNDED
TIES
EXCLUDE

I'm thinking it may make sense to lie about all of these in quote_identifier
so that someone who upgrades from 8.2 to 8.3 can then upgrade to 8.4. If we
add reserved words in one step then there's no way to upgrade except to rename
things before dumping. Any comments?

Does anyone else have any pet features from the spec which introduce new
syntax they would like to see in Postgres soon?

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2007-06-26 14:45:05 Re: [COMMITTERS] pgsql: Arrange for quote_identifier() and pg_dump to not quote keywords
Previous Message Gregory Stark 2007-06-26 13:49:51 Re: [COMMITTERS] pgsql: Arrange for quote_identifier() and pg_dump to not quote keywords

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2007-06-26 14:42:35 Re: Frustrating issue with PGXS
Previous Message A.M. 2007-06-26 14:17:32 Re: no cascade triggers?