Skip to content

Commit 282713a

Browse files
committed
Make the regression tests safe for TOAST.
1 parent 6d1ae0c commit 282713a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/test/regress/expected/sanity_check.out

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
VACUUM;
22
--
33
-- sanity check, if we don't have indices the test will take years to
4-
-- complete.
4+
-- complete. But skip TOAST relations since they will have varying
5+
-- names depending on the current OID counter.
56
--
67
SELECT relname, relhasindex
78
FROM pg_class
8-
WHERE relhasindex
9+
WHERE relhasindex AND relkind != 't'
910
ORDER BY relname;
1011
relname | relhasindex
1112
---------------------+-------------

src/test/regress/expected/type_sanity.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
111111
-- Look for illegal values in pg_class fields
112112
SELECT p1.oid, p1.relname
113113
FROM pg_class as p1
114-
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
115-
p1.relkind != 's' AND p1.relkind != 'S');
114+
WHERE p1.relkind NOT IN ('r', 'i', 's', 'S', 't');
116115
oid | relname
117116
-----+---------
118117
(0 rows)

src/test/regress/sql/sanity_check.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
VACUUM;
33
--
44
-- sanity check, if we don't have indices the test will take years to
5-
-- complete.
5+
-- complete. But skip TOAST relations since they will have varying
6+
-- names depending on the current OID counter.
67
--
78
SELECT relname, relhasindex
89
FROM pg_class
9-
WHERE relhasindex
10+
WHERE relhasindex AND relkind != 't'
1011
ORDER BY relname;
1112

src/test/regress/sql/type_sanity.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
9999

100100
SELECT p1.oid, p1.relname
101101
FROM pg_class as p1
102-
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
103-
p1.relkind != 's' AND p1.relkind != 'S');
102+
WHERE p1.relkind NOT IN ('r', 'i', 's', 'S', 't');
104103

105104
-- Indexes should have an access method, others not.
106105

0 commit comments

Comments
 (0)