aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-08-28 10:14:20 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-08-28 10:14:46 -0400
commit95e28b7f0c9e30cb636f58b5aa351e5f8ae3a473 (patch)
tree3f3ac54389ec9dc0bbcd816fe37e434c9ffc647c /src
parent46596f8d6b5dfdb836fa79788614a3786bc3cbb6 (diff)
downloadpostgresql-95e28b7f0c9e30cb636f58b5aa351e5f8ae3a473.tar.gz
postgresql-95e28b7f0c9e30cb636f58b5aa351e5f8ae3a473.zip
Fix over-aggressive sanity check in misc_sanity.sql.
Fix thinko in commit 8be8510cf: it's okay to have dbid == 0 in normal (non-pin) entries in pg_shdepend, because global objects such as databases are entered that way. The test would pass so long as it was run in a cluster containing no databases/tablespaces owned by, or granted to, roles other than the bootstrap superuser. That's the expected situation for "make check", but for "make installcheck", not so much. Reported by Ryan Murphy. Discussion: https://postgr.es/m/CAHeEsBc6EQe0mxGBKDXAwJbntgfvoAd5MQC-5362SmC3Tng_6g@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/misc_sanity.out2
-rw-r--r--src/test/regress/sql/misc_sanity.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/misc_sanity.out b/src/test/regress/expected/misc_sanity.out
index f02689660bd..5aaae6c39fc 100644
--- a/src/test/regress/expected/misc_sanity.out
+++ b/src/test/regress/expected/misc_sanity.out
@@ -29,7 +29,7 @@ SELECT *
FROM pg_shdepend as d1
WHERE refclassid = 0 OR refobjid = 0 OR
deptype NOT IN ('a', 'o', 'p', 'r') OR
- (deptype != 'p' AND (dbid = 0 OR classid = 0 OR objid = 0)) OR
+ (deptype != 'p' AND (classid = 0 OR objid = 0)) OR
(deptype = 'p' AND (dbid != 0 OR classid != 0 OR objid != 0 OR objsubid != 0));
dbid | classid | objid | objsubid | refclassid | refobjid | deptype
------+---------+-------+----------+------------+----------+---------
diff --git a/src/test/regress/sql/misc_sanity.sql b/src/test/regress/sql/misc_sanity.sql
index 5130a4ab794..b921117fa52 100644
--- a/src/test/regress/sql/misc_sanity.sql
+++ b/src/test/regress/sql/misc_sanity.sql
@@ -32,7 +32,7 @@ SELECT *
FROM pg_shdepend as d1
WHERE refclassid = 0 OR refobjid = 0 OR
deptype NOT IN ('a', 'o', 'p', 'r') OR
- (deptype != 'p' AND (dbid = 0 OR classid = 0 OR objid = 0)) OR
+ (deptype != 'p' AND (classid = 0 OR objid = 0)) OR
(deptype = 'p' AND (dbid != 0 OR classid != 0 OR objid != 0 OR objsubid != 0));