Re: pgsql: Doc: improve documentation about composite-value usage.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Doc: improve documentation about composite-value usage.
Дата
Msg-id 25895.1479870277@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Doc: improve documentation about composite-value usage.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-committers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> ​I found it notable that you choose to introduce the OFFSET 0 hack instead
> of writing a LATERAL query in the "optimization failure" example.​
> SELECT (m).* FROM (SELECT myfunc(x) AS m FROM some_table OFFSET 0) ss;
> instead of​
> SELECT (m).* FROM some_table, LATERAL myfunc(some_table.x) m

Meh ... I'm not really sure that the latter is any less of a hack for this
purpose, or that we'd never optimize it into the unwanted form.  LATERAL
is a good way to fix the weird semantics of set-returning functions in the
tlist, but this is not that case.

            regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Remove barrier.h
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Make sure ALTER TABLE preserves index tablespaces.