| From: | Greg Stark <stark(at)mit(dot)edu> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| 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-29 19:32:48 |
| Message-ID: | CAM-w4HMKVT9oYHCfe2xDraBcL_beX-xrU99WAfOK_CrkDFRNvg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jul 28, 2013 at 7:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
So I'm not really sure how to do it the other way. Once you're in
parser rules I don't know how easy it is to start injecting tokens.
But it seems cleaner this way where only the places where accepting
WITH_ORDINALITY and WITH_TIME create conflicts need to worry about it.
Everywhere else can just accept "with" and not worry about the
problem.
I did the same thing to NULLS_FIRST and NULLS_LAST but then I realized
I couldn't actually fix the rules the same way. NULLS_P is in
unreserved_keywords and adding NULLS_FIRST or NULLS_LAST there creates
conflicts of course. This week isn't one of the two weeks of my life
when I grokked LALR grammars and how to resolve conflicts in bison.
Incidentally I noticed a problem that is actually a bug in the WITH
ORDINALITY patch. The ecpg preprocessor perl script is broken now.
Will fix.
--
greg
| Attachment | Content-Type | Size |
|---|---|---|
| special_tokens_parsing.diff | application/octet-stream | 11.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2013-07-29 19:45:02 | Re: Review: UNNEST (and other functions) WITH ORDINALITY |
| Previous Message | Jeff Janes | 2013-07-29 19:19:00 | Re: Bison 3.0 updates |