]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Implement SQL-compliant treatment of row comparisons for < <= > >= cases
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 28 Dec 2005 01:30:02 +0000 (01:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 28 Dec 2005 01:30:02 +0000 (01:30 +0000)
commit6e07709760a29d8dbfb93b9846c905bd40689082
tree9bf0084587d7e313ba087ce53c24bc748c63a456
parenta37422e042a6114ab0e513f50dac4a47fab22313
Implement SQL-compliant treatment of row comparisons for < <= > >= cases
(previously we only did = and <> correctly).  Also, allow row comparisons
with any operators that are in btree opclasses, not only those with these
specific names.  This gets rid of a whole lot of indefensible assumptions
about the behavior of particular operators based on their names ... though
it's still true that IN and NOT IN expand to "= ANY".  The patch adds a
RowCompareExpr expression node type, and makes some changes in the
representation of ANY/ALL/ROWCOMPARE SubLinks so that they can share code
with RowCompareExpr.

I have not yet done anything about making RowCompareExpr an indexable
operator, but will look at that soon.

initdb forced due to changes in stored rules.
26 files changed:
doc/src/sgml/func.sgml
src/backend/catalog/dependency.c
src/backend/executor/execQual.c
src/backend/executor/nodeSubplan.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/util/clauses.c
src/backend/parser/gram.y
src/backend/parser/parse_expr.c
src/backend/parser/parse_oper.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/cache/lsyscache.c
src/include/catalog/catversion.h
src/include/nodes/execnodes.h
src/include/nodes/nodes.h
src/include/nodes/params.h
src/include/nodes/primnodes.h
src/include/parser/parse_oper.h
src/include/utils/lsyscache.h
src/pl/plpgsql/src/pl_exec.c
src/test/regress/expected/rowtypes.out
src/test/regress/sql/rowtypes.sql