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

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Review: UNNEST (and other functions) WITH ORDINALITY
Дата
Msg-id CAM-w4HMKVT9oYHCfe2xDraBcL_beX-xrU99WAfOK_CrkDFRNvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Review: UNNEST (and other functions) WITH ORDINALITY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Jul 28, 2013 at 7:43 PM, Tom Lane <tgl@sss.pgh.pa.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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Bison 3.0 updates
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Review: UNNEST (and other functions) WITH ORDINALITY