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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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-28 18:43:50
Message-ID: 4869.1375037030@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> Instead of collapsing WITH TIME and WITH ORDINALITY into a single
> token why don't we just modify the WITH token to WITH_FOLLOWED_BY_TIME
> and WITH_FOLLOWED_BY_ORDINALITY but still keep the following token.
> Then we can just include those two tokens everywhere we include WITH.
> Basically we would be giving the parser a free extra token of
> lookahead whenever it gets WITH.

> I think that's isomorphic to what Tom suggested but requires less
> surgery on the parser and automatically covers any other cases we
> don't need to track down.

I suspect it's likely to come out about the same either way once you
account for all the uses of WITH. Might be worth trying both to see
which seems less ugly.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-07-28 18:50:16 Re: replication_reserved_connections
Previous Message Greg Stark 2013-07-28 18:06:57 Re: Review: UNNEST (and other functions) WITH ORDINALITY