pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Doc: improve documentation about composite-value usage.
8+ messages / 2 participants
[nested] [flat]

* pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2016-11-22 22:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Discussion: <16288.1479610770@sss.pgh.pa.us>

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2153cb7a994325f3fafe7eb4d15b96fc199ea696

Modified Files
--------------
doc/src/sgml/queries.sgml  |   3 +-
doc/src/sgml/rowtypes.sgml | 214 +++++++++++++++++++++++++++++++++++++++++++--
doc/src/sgml/syntax.sgml   |  16 ++--
doc/src/sgml/xfunc.sgml    |  69 +++------------
4 files changed, 231 insertions(+), 71 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2016-11-22 22:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Discussion: <16288.1479610770@sss.pgh.pa.us>

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/112676f590331356d1239068260b4642bd6073f2

Modified Files
--------------
doc/src/sgml/queries.sgml  |   3 +-
doc/src/sgml/rowtypes.sgml | 214 +++++++++++++++++++++++++++++++++++++++++++--
doc/src/sgml/syntax.sgml   |  16 ++--
doc/src/sgml/xfunc.sgml    |  70 +++------------
4 files changed, 231 insertions(+), 72 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2016-11-22 22:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Discussion: <16288.1479610770@sss.pgh.pa.us>

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/131483909726a2b5bd509d8bc3b980575f173481

Modified Files
--------------
doc/src/sgml/queries.sgml  |   3 +-
doc/src/sgml/rowtypes.sgml | 213 +++++++++++++++++++++++++++++++++++++++++++--
doc/src/sgml/syntax.sgml   |  16 ++--
doc/src/sgml/xfunc.sgml    |  69 +++------------
4 files changed, 230 insertions(+), 71 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2016-11-22 22:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Discussion: <16288.1479610770@sss.pgh.pa.us>

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ff9730aa15d4f964c0f4bb3bc73b12a9e5312e9a

Modified Files
--------------
doc/src/sgml/queries.sgml  |   3 +-
doc/src/sgml/rowtypes.sgml | 214 +++++++++++++++++++++++++++++++++++++++++++--
doc/src/sgml/syntax.sgml   |  16 ++--
doc/src/sgml/xfunc.sgml    |  69 +++------------
4 files changed, 231 insertions(+), 71 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2016-11-22 22:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Discussion: <16288.1479610770@sss.pgh.pa.us>

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/624839a9739edee79ecb98b09b9f588e8d418358

Modified Files
--------------
doc/src/sgml/queries.sgml  |   3 +-
doc/src/sgml/rowtypes.sgml | 213 +++++++++++++++++++++++++++++++++++++++++++--
doc/src/sgml/syntax.sgml   |  16 ++--
doc/src/sgml/xfunc.sgml    |  69 +++------------
4 files changed, 230 insertions(+), 71 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2016-11-22 22:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Discussion: <16288.1479610770@sss.pgh.pa.us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e1320266edd7df53c60af10b4c33ab2754278b3e

Modified Files
--------------
doc/src/sgml/queries.sgml  |   3 +-
doc/src/sgml/rowtypes.sgml | 214 +++++++++++++++++++++++++++++++++++++++++++--
doc/src/sgml/syntax.sgml   |  16 ++--
doc/src/sgml/xfunc.sgml    |  70 +++------------
4 files changed, 231 insertions(+), 72 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [COMMITTERS] pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-22 23:35  David G. Johnston <david.g.johnston@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: David G. Johnston @ 2016-11-22 23:35 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

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.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Doc: improve documentation about composite-value usage.
@ 2016-11-23 03:04  Tom Lane <tgl@sss.pgh.pa.us>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2016-11-23 03:04 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: 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


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2016-11-23 03:04 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 22:56 pgsql: Doc: improve documentation about composite-value usage. Tom Lane <tgl@sss.pgh.pa.us>
2016-11-22 22:56 pgsql: Doc: improve documentation about composite-value usage. Tom Lane <tgl@sss.pgh.pa.us>
2016-11-22 22:56 pgsql: Doc: improve documentation about composite-value usage. Tom Lane <tgl@sss.pgh.pa.us>
2016-11-22 23:35 ` David G. Johnston <david.g.johnston@gmail.com>
2016-11-23 03:04   ` Tom Lane <tgl@sss.pgh.pa.us>
2016-11-22 22:56 pgsql: Doc: improve documentation about composite-value usage. Tom Lane <tgl@sss.pgh.pa.us>
2016-11-22 22:56 pgsql: Doc: improve documentation about composite-value usage. Tom Lane <tgl@sss.pgh.pa.us>
2016-11-22 22:56 pgsql: Doc: improve documentation about composite-value usage. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox