Thread: pgsql: Allow OLD and NEW in multi-row VALUES within rules.

pgsql: Allow OLD and NEW in multi-row VALUES within rules.

From
Tom Lane
Date:
Allow OLD and NEW in multi-row VALUES within rules.

Now that we have LATERAL, it's fairly painless to allow this case, which
was left as a TODO in the original multi-row VALUES implementation.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/092d7ded29f36b0539046b23b81b9f0bf2d637f1

Modified Files
--------------
src/backend/optimizer/path/allpaths.c |    4 +-
src/backend/parser/analyze.c          |   46 ++++++++-----------
src/backend/parser/parse_relation.c   |    3 +-
src/backend/utils/adt/ruleutils.c     |   57 ++++++++++++++++++------
src/include/nodes/parsenodes.h        |    2 +-
src/include/parser/parse_relation.h   |    1 +
src/test/regress/expected/rules.out   |   78 +++++++++++++++++++++++++++++++++
src/test/regress/sql/rules.sql        |   20 ++++++++
8 files changed, 164 insertions(+), 47 deletions(-)