pgsql: Remove unnecessary restrictions about RowExprs in transformAExpr - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Remove unnecessary restrictions about RowExprs in transformAExpr
Date
Msg-id E1UloHj-0001J1-PO@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Remove unnecessary restrictions about RowExprs in transformAExprIn().

When the existing code here was written, it made sense to special-case
RowExprs because that was the only way that we could handle row comparisons
at all.  Now that we have record_eq() and arrays of composites, the generic
logic for "scalar" types will in fact work on RowExprs too, so there's no
reason to throw error for combinations of RowExprs and other ways of
forming composite values, nor to ignore the possibility of using a
ScalarArrayOpExpr.  But keep using the old logic when comparing two
RowExprs, for consistency with the main transformAExprOp() logic.  (This
allows some cases with not-quite-identical rowtypes to succeed, so we might
get push-back if we removed it.)  Per bug #8198 from Rafal Rzepecki.

Back-patch to all supported branches, since this works fine as far back as
8.4.

Rafal Rzepecki and Tom Lane

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f80872b4bbbf148d018fac92de1022b53a49cf5e

Modified Files
--------------
src/backend/parser/parse_expr.c        |   48 ++++++++++++++++----------------
src/test/regress/expected/rowtypes.out |   39 ++++++++++++++++++++++++++
src/test/regress/sql/rowtypes.sql      |   15 ++++++++++
3 files changed, 78 insertions(+), 24 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Remove unnecessary restrictions about RowExprs in transformAExpr
Next
From: Tom Lane
Date:
Subject: pgsql: Remove unnecessary restrictions about RowExprs in transformAExpr