Re: UNNEST with multiple args, and TABLE with multiple funcs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNNEST with multiple args, and TABLE with multiple funcs
Дата
Msg-id 10523.1386081967@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UNNEST with multiple args, and TABLE with multiple funcs  (Noah Misch <noah@leadboat.com>)
Ответы Re: UNNEST with multiple args, and TABLE with multiple funcs
Список pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> On Mon, Dec 02, 2013 at 08:56:03PM -0500, Tom Lane wrote:
>> Ugh :-(.  Verbose and not exactly intuitive, I think.  I don't like
>> any of the other options you listed much better.  Still, the idea of
>> using more than one word might get us out of the bind that a single
>> word would have to be a fully reserved one.

> I had considered ROWS OF and liked it, but I omitted it from the list on
> account of the shift/reduce conflict from a naturally-written Bison rule.
> Distinguishing it from a list of column aliases takes extra look-ahead.

Hmm, yeah, you're right --- at least one of the first two words needs
to be reserved (not something that can be a ColId, at least), or else
we can't tell them from a table name and alias.  So this approach
doesn't give us all that much extra wiggle room.  We do have a number
of already-fully-reserved prepositions (FOR, FROM, IN, ON, TO) but none
of them seem like great choices.

> ROWS FOR is terse and conflict-free.  "FOR" evokes the resemblance to looping
> over the parenthesized section with the functions acting as generators.

Meh.  I don't find that analogy compelling.

After sleeping on it, your other suggestion of TABLE OF, or possibly
TABLE FROM, is starting to grow on me.

Who else has an opinion?
        regards, tom lane



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Recovery bug in GIN, missing full page image
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Fix a couple of bugs in MultiXactId freezing