From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: When expanding a whole-row Var into a RowExpr during |
Date: | 2008-10-06 17:39:26 |
Message-ID: | 20081006173926.ED6277545A4@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
When expanding a whole-row Var into a RowExpr during ResolveNew(), attach
the column alias names of the RTE referenced by the Var to the RowExpr.
This is needed to allow ruleutils.c to correctly deparse FieldSelect nodes
referencing such a construct. Per my recent bug report.
Adding a field to RowExpr forces initdb (because of stored rules changes)
so this solution is not back-patchable; which is unfortunate because 8.2
and 8.3 have this issue. But it only affects EXPLAIN for some pretty odd
corner cases, so we can probably live without a solution for the back
branches.
Modified Files:
--------------
pgsql/src/backend/nodes:
copyfuncs.c (r1.406 -> r1.407)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c?r1=1.406&r2=1.407)
equalfuncs.c (r1.332 -> r1.333)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c?r1=1.332&r2=1.333)
nodeFuncs.c (r1.33 -> r1.34)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/nodeFuncs.c?r1=1.33&r2=1.34)
outfuncs.c (r1.340 -> r1.341)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c?r1=1.340&r2=1.341)
readfuncs.c (r1.215 -> r1.216)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/readfuncs.c?r1=1.215&r2=1.216)
pgsql/src/backend/optimizer/prep:
prepunion.c (r1.156 -> r1.157)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.156&r2=1.157)
pgsql/src/backend/optimizer/util:
var.c (r1.79 -> r1.80)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/var.c?r1=1.79&r2=1.80)
pgsql/src/backend/parser:
parse_coerce.c (r2.167 -> r2.168)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_coerce.c?r1=2.167&r2=2.168)
parse_expr.c (r1.234 -> r1.235)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_expr.c?r1=1.234&r2=1.235)
pgsql/src/backend/rewrite:
rewriteManip.c (r1.114 -> r1.115)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteManip.c?r1=1.114&r2=1.115)
pgsql/src/backend/utils/adt:
ruleutils.c (r1.285 -> r1.286)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.285&r2=1.286)
pgsql/src/include/catalog:
catversion.h (r1.495 -> r1.496)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.495&r2=1.496)
pgsql/src/include/nodes:
primnodes.h (r1.142 -> r1.143)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/primnodes.h?r1=1.142&r2=1.143)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-10-06 20:29:38 | pgsql: Fix up ruleutils.c for CTE features. |
Previous Message | User Hlipa | 2008-10-06 15:37:55 | orafce - orafce: Improve alligment correctness in pipe.c. |