Strengthen type_sanity's check on pg_type.typarray. It failed to

complain about types that didn't have typarray set.  Noted while
working on txid patch.
This commit is contained in:
Tom Lane 2007-10-13 22:33:38 +00:00
parent ff1de5cef6
commit 2ffc0e8849
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ FROM pg_type as p1
WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS
(SELECT 1 FROM pg_type as p2
WHERE p2.typname = ('_' || p1.typname)::name AND
p2.typelem = p1.oid);
p2.typelem = p1.oid and p1.typarray = p2.oid);
oid | typname
-----+---------
210 | smgr

View File

@ -57,7 +57,7 @@ FROM pg_type as p1
WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS
(SELECT 1 FROM pg_type as p2
WHERE p2.typname = ('_' || p1.typname)::name AND
p2.typelem = p1.oid);
p2.typelem = p1.oid and p1.typarray = p2.oid);
-- Make sure typarray points to a varlena array type of our own base
SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype,