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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: pgsql: Doc: improve documentation about composite-value usage.
Дата
Msg-id CAKFQuwbUcXwY+wysARzvYSGq0nbiV9qKDH_XKBBNwGrQgP9O-w@mail.gmail.com
обсуждение исходный текст
Ответ на pgsql: Doc: improve documentation about composite-value usage.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Doc: improve documentation about composite-value usage.
Список pgsql-committers
On Tue, Nov 22, 2016 at 3:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Doc: improve documentation about composite-value usage.

Create a section specifically for the syntactic rules around whole-row
variable usage, such as expansion of "foo.*".  This was previously
documented only haphazardly, with some critical info buried in
unexpected places like xfunc-sql-composite-functions.  Per repeated
questions in different mailing lists.

​Tom,​

​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

​​Skipping or having a different example in 9.2 seems worth it in order to introduce the now preferred way of writing such queries.

Or maybe in addition, so that some familiarity with the hack is gained should the reader encounter it in the wild.

David J.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: in back branches, don't call it a row constructor if it isn
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Remove barrier.h