Re: WIP patch for LATERAL subqueries

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: WIP patch for LATERAL subqueries
Дата
Msg-id CA+TgmoawmtEYJ_BpH-DfNStjyJ+i=pkEaTQdHf6LMDX4RGAumQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP patch for LATERAL subqueries  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP patch for LATERAL subqueries
Список pgsql-hackers
On Mon, Aug 6, 2012 at 11:09 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I think you can always simulate CROSS APPLY using LATERAL.  The syntax
>> is different but the functionality is the same.  However, OUTER APPLY
>> allows you to do something that I don't think is possible using
>> LATERAL.
>
> Uh, what exactly?  AFAICT from that blog entry, "x OUTER APPLY y" is
> exactly the same as "x LEFT JOIN LATERAL y ON true".  Okay, so you
> saved three words, but is that a good enough reason to invent a
> nonstandard syntax?

I wasn't sure that x LEFT JOIN LATERAL (SELECT * FROM y) ON true is
valid syntax.  I thought that perhaps LATERAL() was only allowed
around a top-level FROM-list item.

However, if it is allowed, then I agree that the extra syntax isn't
adding any functionality; it's just a question of whether you happen
to like their particular choice of notational shorthand.

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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: WIP Patch: Use sortedness of CSV foreign tables for query planning
Следующее
От: Tom Lane
Дата:
Сообщение: Re: tzdata2012d