postgresql/src/include
Tom Lane 4387cf956b Avoid inserting Result nodes that only compute identity projections.
The planner sometimes inserts Result nodes to perform column projections
(ie, arbitrary scalar calculations) above plan nodes that lack projection
logic of their own.  However, we did that even if the lower plan node was
in fact producing the required column set already; which is a pretty common
case given the popularity of "SELECT * FROM ...".  Measurements show that
the useless plan node adds non-negligible overhead, especially when there
are many columns in the result.  So add a check to avoid inserting a Result
node unless there's something useful for it to do.

There are a couple of remaining places where unnecessary Result nodes
could get inserted, but they are (a) much less performance-critical,
and (b) coded in such a way that it's hard to avoid inserting a Result,
because the desired tlist is changed on-the-fly in subsequent logic.
We'll leave those alone for now.

Kyotaro Horiguchi; reviewed and further hacked on by Amit Kapila and
Tom Lane.
2013-03-14 13:43:18 -04:00
..
access Fix tli history file fetching, broken by the archive after crash recevery patch. 2013-03-07 12:33:24 +02:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Add cost estimation of range @> and <@ operators. 2013-03-14 15:36:56 +02:00
commands Fix missing #include in commands/matview.h. 2013-03-06 18:21:05 -05:00
common Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Add a materialized view relations. 2013-03-03 18:23:31 -06:00
foreign Support writable foreign tables. 2013-03-10 14:16:02 -04:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Report pg_hba line number and contents when users fail to log in 2013-03-10 15:54:37 +01:00
mb Add noreturn attributes to some error reporting functions 2013-02-12 07:13:22 -05:00
nodes Support writable foreign tables. 2013-03-10 14:16:02 -04:00
optimizer Avoid inserting Result nodes that only compute identity projections. 2013-03-14 13:43:18 -04:00
parser Add a materialized view relations. 2013-03-03 18:23:31 -06:00
port Add URLs to document why DLLIMPORT is needed on Windows. 2012-11-07 15:01:25 -05:00
portability Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Fix background workers for EXEC_BACKEND 2013-01-02 12:01:14 -03:00
regex Re-implement extraction of fixed prefixes from regular expressions. 2012-07-10 14:54:37 -04:00
replication Fix more issues with cascading replication and timeline switches. 2013-01-23 10:19:20 +02:00
rewrite Get rid of any toast table when converting a table to a view. 2013-03-03 19:05:47 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Add support for piping COPY to/from an external program. 2013-02-27 18:22:31 +02:00
tcop Add a materialized view relations. 2013-03-03 18:23:31 -06:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils JSON generation improvements. 2013-03-10 17:35:36 -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 Move ExceptionalCondition back to postgres.h 2013-02-18 18:53:32 -03:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Install headers from the new src/include/common subdirectory. 2013-02-26 15:27:30 -05:00
miscadmin.h Make sure MaxBackends is always set 2013-01-02 14:39:11 -03:00
pg_config.h.in Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config.h.win32 Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05: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 Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Split pgstat file in smaller pieces 2013-02-18 18:12:52 -03:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
port.h Add support for piping COPY to/from an external program. 2013-02-27 18:22:31 +02:00
postgres.h Move ExceptionalCondition back to postgres.h 2013-02-18 18:53:32 -03:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00