pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-committers@postgresql.org <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Doc: improve documentation about composite-value usage.
Date: Tue, 22 Nov 2016 22:04:37 -0500
Message-ID: <25895.1479870277@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbUcXwY+wysARzvYSGq0nbiV9qKDH_XKBBNwGrQgP9O-w@mail.gmail.com>
References: <E1c9Jzm-0005Ob-Qz@gemulon.postgresql.org>
	<CAKFQuwbUcXwY+wysARzvYSGq0nbiV9qKDH_XKBBNwGrQgP9O-w@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (8+ messages)

Message-ID: <25895.1479870277@sss.pgh.pa.us>
Permalink:  ../25895.1479870277@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25895.1479870277@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com
  Subject: Re: pgsql: Doc: improve documentation about composite-value usage.
  In-Reply-To: <25895.1479870277@sss.pgh.pa.us>
  References: <E1c9Jzm-0005Ob-Qz@gemulon.postgresql.org> <CAKFQuwbUcXwY+wysARzvYSGq0nbiV9qKDH_XKBBNwGrQgP9O-w@mail.gmail.com> <25895.1479870277@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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