postgresql/src/include
Tom Lane d3237e04ca Fix SELECT DISTINCT with index-optimized MIN/MAX on inheritance trees.
In a query such as "SELECT DISTINCT min(x) FROM tab", the DISTINCT is
pretty useless (there being only one output row), but nonetheless it
shouldn't fail.  But it could fail if "tab" is an inheritance parent,
because planagg.c's code for fixing up equivalence classes after making the
index-optimized MIN/MAX transformation wasn't prepared to find child-table
versions of the aggregate expression.  The least ugly fix seems to be
to add an option to mutate_eclass_expressions() to skip child-table
equivalence class members, which aren't used anymore at this stage of
planning so it's not really necessary to fix them.  Since child members
are ignored in many cases already, it seems plausible for
mutate_eclass_expressions() to have an option to ignore them too.

Per bug #7703 from Maxim Boguk.

Back-patch to 9.1.  Although the same code exists before that, it cannot
encounter child-table aggregates AFAICS, because the index optimization
transformation cannot succeed on inheritance trees before 9.1 (for lack
of MergeAppend).
2012-11-26 12:57:58 -05:00
..
access Fix archive_cleanup_command. 2012-11-19 10:14:20 +02:00
bootstrap Fix management of pendingOpsTable in auxiliary processes. 2012-07-18 15:28:10 -04:00
catalog Fix ALTER EXTENSION / SET SCHEMA 2012-10-31 10:52:55 -03:00
commands Fix ALTER EXTENSION / SET SCHEMA 2012-10-31 10:52:55 -03:00
datatype Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
executor Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
foreign Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
lib Remove unnecessary "head" arguments from some dlist/slist functions. 2012-10-18 19:04:20 -04:00
libpq Add API for 64-bit large object access. Now users can access up to 2012-10-07 08:36:48 +09:00
mb Fix bogus macro definition. 2012-07-10 22:36:11 -04:00
nodes Fix handling of inherited check constraints in ALTER COLUMN TYPE. 2012-11-05 13:36:16 -05:00
optimizer Fix SELECT DISTINCT with index-optimized MIN/MAX on inheritance trees. 2012-11-26 12:57:58 -05:00
parser Use correct text domain for translating errcontext() messages. 2012-11-12 17:07:29 +02:00
port Add URLs to document why DLLIMPORT is needed on Windows. 2012-11-07 15:01:25 -05:00
portability Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Support having multiple Unix-domain sockets per postmaster. 2012-08-10 17:27:15 -04:00
regex Re-implement extraction of fixed prefixes from regular expressions. 2012-07-10 14:54:37 -04:00
replication Make the streaming replication protocol messages architecture-independent. 2012-11-07 19:09:13 +02:00
rewrite Rename ResolveNew() to ReplaceVarsFromTargetList(), and tweak its API. 2012-11-08 16:52:49 -05:00
snowball Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
storage Fix WaitLatch() to return promptly when the requested timeout expires. 2012-11-08 20:04:48 -05:00
tcop Remove execdesc.h inclusion from tcopprot.h 2012-09-20 11:07:59 -03:00
tsearch Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
utils Use correct text domain for translating errcontext() messages. 2012-11-12 17:07:29 +02:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Silence "expression result unused" warnings in AssertVariableIsOfTypeMacro 2012-11-12 15:02:40 +02:00
fmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
funcapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getaddrinfo.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
miscadmin.h Remove comment that is no longer true. 2012-10-15 11:03:39 +03:00
pg_config.h.in Rename USE_INLINE to PG_USE_INLINE 2012-10-09 11:17:33 -03:00
pg_config.h.win32 Rename USE_INLINE to PG_USE_INLINE 2012-10-09 11:17:33 -03:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pg_trace.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pgstat.h Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
pgtime.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
port.h Make new event trigger facility actually do something. 2012-07-20 11:39:01 -04:00
postgres.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
postgres_ext.h Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00