]> granicus.if.org Git - postgresql/commit
Implement comparison of generic records (composite types), and invent a
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 13 Oct 2008 16:25:20 +0000 (16:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 13 Oct 2008 16:25:20 +0000 (16:25 +0000)
commite3b0117459fd24b15cb5e88f563b5d87f051cfdc
treeacca06e323ff71b1cd964fab08a2cf5fe9ca37ac
parentd6dfa1e6c63e01def34dc3fcc5978b0a60ea6ca8
Implement comparison of generic records (composite types), and invent a
pseudo-type record[] to represent arrays of possibly-anonymous composite
types.  Since composite datums carry their own type identification, no
extra knowledge is needed at the array level.

The main reason for doing this right now is that it is necessary to support
the general case of detection of cycles in recursive queries: if you need to
compare more than one column to detect a cycle, you need to compare a ROW()
to an array built from ROW()s, at least if you want to do it as the spec
suggests.  Add some documentation and regression tests concerning the cycle
detection issue.
18 files changed:
doc/src/sgml/func.sgml
doc/src/sgml/queries.sgml
src/backend/commands/indexcmds.c
src/backend/parser/parse_coerce.c
src/backend/utils/adt/rowtypes.c
src/include/catalog/catversion.h
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_opfamily.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_type.h
src/include/utils/builtins.h
src/test/regress/expected/rowtypes.out
src/test/regress/expected/with.out
src/test/regress/sql/rowtypes.sql
src/test/regress/sql/with.sql