pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: fix ancient mistake, or at least obsolete info, in rules ex
Date: Mon, 11 Nov 2019 19:40:15 +0000
Message-ID: <E1iUFXr-0007K9-Kl@gemulon.postgresql.org> (raw)

Doc: fix ancient mistake, or at least obsolete info, in rules example.

The example of expansion of multiple views claimed that the resulting
subquery nest would not get fully flattened because of an aggregate
function.  There's no aggregate in the example, though, only a user
defined function confusingly named MIN().  In a modern server, the
reason for the non-flattening is that MIN() is volatile, but I'm
unsure whether that was true back when this text was written.

Let's reduce the confusion level by using LEAST() instead (which
we didn't have at the time this example was created).  And then
we can just say that the planner will flatten the sub-queries, so
the rewrite system doesn't have to.

Noted by Paul Jungwirth.  This text is old enough to vote, so
back-patch to all supported branches.

Discussion: https://postgr.es/m/CA+renyXZFnmp9PcvX1EVR2dR=XG5e6E-AELr8AHCNZ8RYrpnPw@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/02f7b7ab75680440695a1e205cbb6636551b6013

Modified Files
--------------
doc/src/sgml/rules.sgml | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1iUFXr-0007K9-Kl@gemulon.postgresql.org>
Permalink:  ../E1iUFXr-0007K9-Kl@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iUFXr-0007K9-Kl@gemulon.postgresql.org

 · 

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
  Subject: Re: pgsql: Doc: fix ancient mistake, or at least obsolete info, in rules ex
  In-Reply-To: <E1iUFXr-0007K9-Kl@gemulon.postgresql.org>
  References: <E1iUFXr-0007K9-Kl@gemulon.postgresql.org>

* 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