Skip to content
Snippets Groups Projects
Commit 2ffc0e88 authored by Tom Lane's avatar Tom Lane
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,7 @@ FROM pg_type as p1 ...@@ -62,7 +62,7 @@ FROM pg_type as p1
WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS
(SELECT 1 FROM pg_type as p2 (SELECT 1 FROM pg_type as p2
WHERE p2.typname = ('_' || p1.typname)::name AND WHERE p2.typname = ('_' || p1.typname)::name AND
p2.typelem = p1.oid); p2.typelem = p1.oid and p1.typarray = p2.oid);
oid | typname oid | typname
-----+--------- -----+---------
210 | smgr 210 | smgr
......
...@@ -57,7 +57,7 @@ FROM pg_type as p1 ...@@ -57,7 +57,7 @@ FROM pg_type as p1
WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS
(SELECT 1 FROM pg_type as p2 (SELECT 1 FROM pg_type as p2
WHERE p2.typname = ('_' || p1.typname)::name AND 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 -- Make sure typarray points to a varlena array type of our own base
SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype, SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment