OSDN Git Service

Allow domains over arrays to match ANYARRAY parameters again.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Jun 2011 16:52:12 +0000 (12:52 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Jun 2011 16:52:58 +0000 (12:52 -0400)
commitb7e8feb33e5d948c66720643fe32cfb06980c3d1
treece857d48d94ccb16746978b718ebd16fa0e9529e
parent8f9622bbb3c02b06176760c3ca2d33c5b5f629a7
Allow domains over arrays to match ANYARRAY parameters again.

This use-case was broken in commit 529cb267a6843a6a8190c86b75d091771d99d6a9
of 2010-10-21, in which I commented "For the moment, we just forbid such
matching.  We might later wish to insert an automatic downcast to the
underlying array type, but such a change should also change matching of
domains to ANYELEMENT for consistency".  We still lack consensus about what
to do with ANYELEMENT; but not matching ANYARRAY is a clear loss of
functionality compared to prior releases, so let's go ahead and make that
happen.  Per complaint from Regina Obe and extensive subsequent discussion.
src/backend/parser/parse_coerce.c
src/test/regress/expected/domain.out
src/test/regress/sql/domain.sql