Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-hackers by date

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

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group