postgresql/src/include
Tom Lane f15821eefd Allow join removal in some cases involving a left join to a subquery.
We can remove a left join to a relation if the relation's output is
provably distinct for the columns involved in the join clause (considering
only equijoin clauses) and the relation supplies no variables needed above
the join.  Previously, the join removal logic could only prove distinctness
by reference to unique indexes of a table.  This patch extends the logic
to consider subquery relations, wherein distinctness might be proven by
reference to GROUP BY, DISTINCT, etc.

We actually already had some code to check that a subquery's output was
provably distinct, but it was hidden inside pathnode.c; which was a pretty
bad place for it really, since that file is mostly boilerplate Path
construction and comparison.  Move that code to analyzejoins.c, which is
arguably a more appropriate location, and is certainly the site of the
new usage for it.

David Rowley, reviewed by Simon Riggs
2014-07-15 21:12:43 -04:00
..
access Move view reloptions into their own varlena struct 2014-07-14 17:24:40 -04:00
bootstrap Update copyright for 2014 2014-01-07 16:05:30 -05:00
catalog json_build_object and json_build_array are stable, not immutable. 2014-07-15 14:24:47 -04:00
commands Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
common pgindent run for 9.4 2014-05-06 12:12:18 -04:00
datatype pgindent run for 9.4 2014-05-06 12:12:18 -04:00
executor Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:14:26 -04:00
foreign Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Rename lo_create(oid, bytea) to lo_from_bytea(). 2014-06-12 15:39:09 -04:00
mb pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nodes Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
optimizer Allow join removal in some cases involving a left join to a subquery. 2014-07-15 21:12:43 -04:00
parser Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
port Remove Alpha and Tru64 support. 2014-06-28 21:46:15 +02:00
portability pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postmaster When a background worker exists with code 0, unregister it. 2014-05-07 17:44:42 -04:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Fix decoding of MULTI_INSERTs when rows other than the last are toasted. 2014-07-06 15:58:01 +02:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball pgindent run for 9.4 2014-05-06 12:12:18 -04:00
storage Remove swpb-based spinlock implementation for ARMv5 and earlier. 2014-07-06 14:56:36 -04:00
tcop pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tsearch Allow opclasses to provide tri-valued GIN consistent functions. 2014-03-12 17:51:30 +02:00
utils Move view reloptions into their own varlena struct 2014-07-14 17:24:40 -04: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 Don't allow to disable backend assertions via the debug_assertions GUC. 2014-06-20 11:09:17 +02:00
fmgr.h Redesign API presented by nodeAgg.c for ordered-set and similar aggregates. 2014-07-03 18:25:33 -04:00
funcapi.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:24 -04:00
getopt_long.h Centralize getopt-related declarations in a new header file pg_getopt.h. 2014-02-15 14:31:30 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pg_config.h.in Detect presence of SSL_get_current_compression 2014-07-15 18:07:03 +02:00
pg_config.h.win32 Detect presence of SSL_get_current_compression 2014-07-15 18:07:03 +02: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 Revert accidental change of WAL_DEBUG default. 2014-06-17 08:52:41 +03:00
pg_getopt.h Fix comment. 2014-05-08 12:42:56 -04:00
pg_trace.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgstat.h Save pg_stat_statements statistics file into $PGDATA/pg_stat directory at shutdown. 2014-06-04 12:09:45 +09:00
pgtar.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgtime.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
port.h Detect presence of SSL_get_current_compression 2014-07-15 18:07:03 +02:00
postgres.h Fix typos in comments. 2014-07-07 19:39:42 +09:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rusagestub.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00