diff options
Diffstat (limited to 'src/test/regress/sql/opr_sanity.sql')
-rw-r--r-- | src/test/regress/sql/opr_sanity.sql | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql index 0528e3657c3..7b1d2b54cba 100644 --- a/src/test/regress/sql/opr_sanity.sql +++ b/src/test/regress/sql/opr_sanity.sql @@ -24,7 +24,12 @@ create function binary_coercible(oid, oid) returns bool as 'SELECT ($1 = $2) OR EXISTS(select 1 from pg_cast where castsource = $1 and casttarget = $2 and - castfunc = 0 and castcontext = ''i'')' + castfunc = 0 and castcontext = ''i'') OR + ( EXISTS(select 1 from pg_type source where + source.oid = $1 and source.typelem != 0 ) + AND + EXISTS(select 1 from pg_type target where + target.oid = $2 and target.typname = ''anyarray'' ) )' language sql; -- This one ignores castcontext, so it considers only physical equivalence @@ -634,13 +639,13 @@ WHERE p1.amopclaid = p3.oid AND p3.opcamid = p2.oid AND -- Detect missing pg_amop entries: should have as many strategy operators -- as AM expects for each opclass for the AM. When nondefault subtypes are -- present, enforce condition separately for each subtype. --- We have to exclude GiST, unfortunately, since it hasn't got any fixed +-- We have to exclude GiST and GIN, unfortunately, since its havn't got any fixed -- requirements about strategy operators. SELECT p1.oid, p1.amname, p2.oid, p2.opcname, p3.amopsubtype FROM pg_am AS p1, pg_opclass AS p2, pg_amop AS p3 WHERE p2.opcamid = p1.oid AND p3.amopclaid = p2.oid AND - p1.amname != 'gist' AND + p1.amname != 'gist' AND p1.amname != 'gin' AND p1.amstrategies != (SELECT count(*) FROM pg_amop AS p4 WHERE p4.amopclaid = p2.oid AND p4.amopsubtype = p3.amopsubtype); |