postgresql/src/include
Tom Lane 6a75562ed1 Get rid of multiple applications of transformExpr() to the same tree.
transformExpr() has for many years had provisions to do nothing when
applied to an already-transformed expression tree.  However, this was
always ugly and of dubious reliability, so we'd be much better off without
it.  The primary historical reason for it was that gram.y sometimes
returned multiple links to the same subexpression, which is no longer true
as of my BETWEEN fixes.  We'd also grown some lazy hacks in CREATE TABLE
LIKE (failing to distinguish between raw and already-transformed index
specifications) and one or two other places.

This patch removes the need for and support for re-transforming already
transformed expressions.  The index case is dealt with by adding a flag
to struct IndexStmt to indicate that it's already been transformed;
which has some benefit anyway in that tablecmds.c can now Assert that
transformation has happened rather than just assuming.  The other main
reason was some rather sloppy code for array type coercion, which can
be fixed (and its performance improved too) by refactoring.

I did leave transformJoinUsingClause() still constructing expressions
containing untransformed operator nodes being applied to Vars, so that
transformExpr() still has to allow Var inputs.  But that's a much narrower,
and safer, special case than before, since Vars will never appear in a raw
parse tree, and they don't have any substructure to worry about.

In passing fix some oversights in the patch that added CREATE INDEX
IF NOT EXISTS (missing processing of IndexStmt.if_not_exists).  These
appear relatively harmless, but still sloppy coding practice.
2015-02-22 13:59:09 -05:00
..
access Use FLEXIBLE_ARRAY_MEMBER for HeapTupleHeaderData.t_bits[]. 2015-02-21 15:13:06 -05:00
bootstrap Allow forcing nullness of columns during bootstrap. 2015-02-21 22:31:54 +01:00
catalog Force some system catalog table columns to be marked NOT NULL. 2015-02-21 22:37:05 +01:00
commands Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
common Speed up CRC calculation using slicing-by-8 algorithm. 2015-02-10 10:54:40 +02:00
datatype Update copyright for 2015 2015-01-06 11:43:47 -05:00
executor Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix a bug in pairing heap removal code. 2015-02-17 22:55:53 +02:00
libpq Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 addresses. 2015-02-17 12:49:18 -05:00
mb Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodes Get rid of multiple applications of transformExpr() to the same tree. 2015-02-22 13:59:09 -05:00
optimizer Fix EXPLAIN output for cases where parent table is excluded by constraints. 2015-02-17 18:04:11 -05:00
parser Prevent duplicate escape-string warnings when using pg_stat_statements. 2015-01-22 18:11:00 -05:00
port Add strxfrm_l to list of functions where Windows adds an underscore. 2015-01-20 10:52:01 -05:00
portability Update copyright for 2015 2015-01-06 11:43:47 -05:00
postmaster Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
regex Update copyright for 2015 2015-01-06 11:43:47 -05:00
replication Use FLEXIBLE_ARRAY_MEMBER for HeapTupleHeaderData.t_bits[]. 2015-02-21 15:13:06 -05:00
rewrite Fix column-privilege leak in error-message paths 2015-01-28 12:31:30 -05:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
tcop Process 'die' interrupts while reading/writing from the client socket. 2015-02-03 22:45:45 +01:00
tsearch Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER member. 2015-02-20 17:50:18 -05:00
utils In array_agg(), don't create a new context for every group. 2015-02-21 17:24:48 -08: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 Use FLEXIBLE_ARRAY_MEMBER in struct varlena. 2015-02-20 16:51:53 -05:00
fmgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
funcapi.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
getaddrinfo.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
getopt_long.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
Makefile Install all headers for the new atomics API. 2014-10-02 16:52:21 +02:00
miscadmin.h Remove remnants of ImmediateInterruptOK handling. 2015-02-03 23:25:47 +01:00
pg_config.h.in Speed up CRC calculation using slicing-by-8 algorithm. 2015-02-10 10:54:40 +02:00
pg_config.h.win32 Speed up CRC calculation using slicing-by-8 algorithm. 2015-02-10 10:54:40 +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 Use abbreviated keys for faster sorting of text datums. 2015-01-19 15:28:27 -05:00
pg_getopt.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_trace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pgstat.h Update PGSTAT_FILE_FORMAT_ID 2015-02-20 12:59:27 -03:00
pgtar.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pgtime.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
port.h Don't require users of src/port/gettimeofday.c to initialize it. 2015-02-21 12:17:04 -05:00
postgres.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
rusagestub.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
windowapi.h Update copyright for 2015 2015-01-06 11:43:47 -05:00