postgresql/src
Tom Lane 8f61f0b843 Fix the handling of sub-SELECTs appearing in the arguments of an outer-level
aggregate function.  By definition, such a sub-SELECT cannot reference any
variables of query levels between itself and the aggregate's semantic level
(else the aggregate would've been assigned to that lower level instead).
So the correct, most efficient implementation is to treat the sub-SELECT as
being a sub-select of that outer query level, not the level the aggregate
syntactically appears in.  Not doing so also confuses the heck out of our
parameter-passing logic, as illustrated in bug report from Daniel Grace.

Fortunately, we were already copying the whole Aggref expression up to the
outer query level, so all that's needed is to delay SS_process_sublinks
processing of the sub-SELECT until control returns to the outer level.

This has been broken since we introduced spec-compliant treatment of
outer aggregates in 7.4; so patch all the way back.
2009-04-25 16:45:03 +00:00
..
backend Fix the handling of sub-SELECTs appearing in the arguments of an outer-level 2009-04-25 16:45:03 +00:00
bin Improve pg_dump's query for retrieving BLOB comments to be more efficient 2009-04-01 18:54:33 +00:00
include Fix planner to restore its previous level of intelligence about pushing 2009-04-16 20:42:28 +00:00
interfaces tag 8.3.7 2009-03-13 02:08:41 +00:00
makefiles Teach pgxs.mk and Install.pm how to install files from a contrib module 2007-10-16 16:00:00 +00:00
pl plpgsql's exec_simple_cast_value() mistakenly supposed that it could bypass 2009-04-02 01:16:17 +00:00
port Use (unsigned char) cast in argument of pg_tolower(). Maybe it works on 2009-04-03 23:27:22 +00:00
template Use SYSV semaphores rather than POSIX on Darwin >= 6.0 (i.e., OS X 10.2 2007-09-26 00:32:46 +00:00
test Fix the handling of sub-SELECTs appearing in the arguments of an outer-level 2009-04-25 16:45:03 +00:00
timezone Update time zone data files to tzdata release 2009e: DST law changes in 2009-04-09 20:50:51 +00:00
tools Create a script to handle stamping release version numbers into files, 2008-06-10 18:08:55 +00:00
tutorial Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Testing commit stuff 2006-07-10 15:50:02 +00:00
Makefile Tsearch2 functionality migrates to core. The bulk of this work is by 2007-08-21 01:11:32 +00:00
Makefile.global.in I find that an out-of-the-box installation of OSSP uuid 1.6.0 installs 2007-11-13 00:13:19 +00:00
Makefile.shlib Change $(CC) to $(COMPILER) on Solaris gcc so -m64 is passed into the 2007-02-20 22:45:57 +00:00
nls-global.mk When merging PO files, take into consideration translations in other PO 2006-04-05 13:40:15 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00