From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Give pull_var_clause() reject/recurse/return behavior for Window
Date: Thu, 10 Mar 2016 21:23:58 +0000
Message-ID: <E1ae83q-0001sJ-Bf@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Give pull_var_clause() reject/recurse/return behavior for WindowFuncs too.
All along, this function should have treated WindowFuncs in a manner
similar to Aggrefs, ie with an option whether or not to recurse into them.
By not considering the case, it was always recursing, which is OK for most
callers (although I suspect that the case in prepare_sort_from_pathkeys
might represent a bug). But now we need return-without-recursing behavior
as well. There are also more than a few callers that should never see a
WindowFunc, and now we'll get some error checking on that.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/c82c92b111b7b636e80f8a432de10c62011b35b6
Modified Files
--------------
src/backend/optimizer/path/equivclass.c | 1 +
src/backend/optimizer/plan/createplan.c | 4 +++-
src/backend/optimizer/plan/initsplan.c | 5 ++++-
src/backend/optimizer/plan/planner.c | 9 ++++++---
src/backend/optimizer/prep/preptlist.c | 1 +
src/backend/optimizer/util/placeholder.c | 2 ++
src/backend/optimizer/util/var.c | 25 +++++++++++++++++++++++++
src/backend/utils/adt/selfuncs.c | 1 +
src/include/optimizer/var.h | 6 ++++--
9 files changed, 47 insertions(+), 7 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: Give pull_var_clause() reject/recurse/return behavior for Window
In-Reply-To: <E1ae83q-0001sJ-Bf@gemulon.postgresql.org>
References: <E1ae83q-0001sJ-Bf@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