Skip to content

Commit 2ffc0e8

Browse files
committed
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.
1 parent ff1de5c commit 2ffc0e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/regress/expected/type_sanity.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ FROM pg_type as p1
6262
WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS
6363
(SELECT 1 FROM pg_type as p2
6464
WHERE p2.typname = ('_' || p1.typname)::name AND
65-
p2.typelem = p1.oid);
65+
p2.typelem = p1.oid and p1.typarray = p2.oid);
6666
oid | typname
6767
-----+---------
6868
210 | smgr

src/test/regress/sql/type_sanity.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ FROM pg_type as p1
5757
WHERE p1.typtype in ('b','e') AND p1.typname NOT LIKE E'\\_%' AND NOT EXISTS
5858
(SELECT 1 FROM pg_type as p2
5959
WHERE p2.typname = ('_' || p1.typname)::name AND
60-
p2.typelem = p1.oid);
60+
p2.typelem = p1.oid and p1.typarray = p2.oid);
6161

6262
-- Make sure typarray points to a varlena array type of our own base
6363
SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy