Skip to content

Commit b7332c9

Browse files
committed
Correct type_sanity test so it doesn't spit up on new
definition of numeric_in.
1 parent 0b69d8a commit b7332c9

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/test/regress/expected/type_sanity.out

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
4040
FROM pg_type AS p1, pg_proc AS p2
4141
WHERE p1.typinput = p2.oid AND p1.typtype = 'b' AND
4242
(p2.pronargs != 1 OR p2.proretset) AND
43-
(p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
43+
(p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
4444
oid|typname|oid|proname
4545
---+-------+---+-------
4646
(0 rows)
@@ -58,7 +58,7 @@ QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
5858
FROM pg_type AS p1, pg_proc AS p2
5959
WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
6060
(p2.pronargs != 1 OR p2.proretset) AND
61-
(p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
61+
(p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
6262
oid|typname|oid|proname
6363
---+-------+---+-------
6464
(0 rows)
@@ -74,7 +74,8 @@ oid|typname|oid|proname
7474

7575
QUERY: SELECT p1.oid, p1.relname
7676
FROM pg_class as p1
77-
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND p1.relkind != 's');
77+
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
78+
p1.relkind != 's' AND p1.relkind != 'S');
7879
oid|relname
7980
---+-------
8081
(0 rows)

src/test/regress/sql/type_sanity.sql

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ WHERE p1.typtype != 'c' AND
4949
p1.typreceive = 0 OR p1.typsend = 0);
5050

5151
-- Check for bogus typinput routines
52-
-- The first OR subclause detects bogus non-array cases,
53-
-- the second one detects bogus array cases.
5452
-- FIXME: ought to check prorettype, but there are special cases that make it
5553
-- hard: prorettype might be binary-compatible with the type but not the same,
5654
-- and for array types array_in's result has nothing to do with anything.
@@ -59,7 +57,7 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
5957
FROM pg_type AS p1, pg_proc AS p2
6058
WHERE p1.typinput = p2.oid AND p1.typtype = 'b' AND
6159
(p2.pronargs != 1 OR p2.proretset) AND
62-
(p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
60+
(p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
6361

6462
-- Check for bogus typoutput routines
6563
-- The first OR subclause detects bogus non-array cases,
@@ -73,8 +71,6 @@ WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND
7371
(p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
7472

7573
-- Check for bogus typreceive routines
76-
-- The first OR subclause detects bogus non-array cases,
77-
-- the second one detects bogus array cases.
7874
-- FIXME: ought to check prorettype, but there are special cases that make it
7975
-- hard: prorettype might be binary-compatible with the type but not the same,
8076
-- and for array types array_in's result has nothing to do with anything.
@@ -83,7 +79,7 @@ SELECT p1.oid, p1.typname, p2.oid, p2.proname
8379
FROM pg_type AS p1, pg_proc AS p2
8480
WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
8581
(p2.pronargs != 1 OR p2.proretset) AND
86-
(p2.pronargs != 3 OR p2.proretset OR p1.typelem = 0);
82+
(p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
8783

8884
-- Check for bogus typsend routines
8985
-- The first OR subclause detects bogus non-array cases,
@@ -102,7 +98,8 @@ WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
10298

10399
SELECT p1.oid, p1.relname
104100
FROM pg_class as p1
105-
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND p1.relkind != 's');
101+
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
102+
p1.relkind != 's' AND p1.relkind != 'S');
106103

107104
-- Indexes should have an access method, others not.
108105

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