Re: Review: UNNEST (and other functions) WITH ORDINALITY

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Date: 2013-07-25 19:44:54
Message-ID: CA+Tgmoa6rQmwjRK6DTmDDZU2QHUhVj===Lcvsy6eeRG9ULVayg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 24, 2013 at 1:50 PM, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Wed, Jul 24, 2013 at 6:39 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> This patch will introduce, without documentation, a fifth class of
>> keyword. ORDINALITY will need to be quoted when, and only when, it
>> immediately follows WITH. Without some change to our deparsing code,
>> this is a dump/restore hazard; and with some such change it's still
>> probably not a good idea.
>
> Strictly speaking this patc doesn't introduce this fifth class of
> keyword. We already had TIME in that category (and also FIRST and LAST
> in a similar category following NULLS). If we have a solution for WITH
> <keyword> then presumably we would implement it for WITH TIME and WITH
> ORDINALITY at the same time.
>
> In the interim I suppose we could teach pg_dump to quote any keyword
> that follows WITH or NULLS pretty easily. Or just quote those four
> words unconditionally.

Making these keywords reserved-enough they get quoted would indeed fix
the problem. It may not be desirable for other reasons, but the fact
that we have existing cases where pg_dump DTWT doesn't seem like a
good reason to add more of them.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-07-25 19:58:06 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message Tom Lane 2013-07-25 18:22:49 Re: pgsql: Add GET DIAGNOSTICS ... PG_CONTEXT in PL/PgSQL