Skip site navigation (1) Skip section navigation (2)

pgsql: Give pull_var_clause() reject/recurse/return behavior for Window

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Give pull_var_clause() reject/recurse/return behavior for Window
Date: 2016-03-10 21:23:58
Message-ID: E1ae83q-0001sJ-Bf@gemulon.postgresql.org (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-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(-)


pgsql-committers by date

Next:From: Robert HaasDate: 2016-03-10 21:24:55
Subject: Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.
Previous:From: Andres FreundDate: 2016-03-10 21:22:26
Subject: Re: pgsql: Don't vacuum all-frozen pages.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group