Commit 2ffc0e88 authored by Tom Lane's avatar Tom Lane

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.
parent ff1de5ce
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment