summaryrefslogtreecommitdiff
path: root/src/test/regress/sql/opr_sanity.sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-12-18 18:56:29 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-12-18 18:56:29 +0000
commit93b4f0ff7711d42b8c10e48b0a7575e2847e30b3 (patch)
tree407a0358962555c7dd1bc475671eb1d1a977137e /src/test/regress/sql/opr_sanity.sql
parent6b4fe0460cac52973c16c279cfc5d89b066c1fe0 (diff)
downloadpostgresql-93b4f0ff7711d42b8c10e48b0a7575e2847e30b3.tar.gz
Set pg_am.amstrategies to zero for index AMs that don't have fixed
operator strategy numbers, ie, GiST and GIN. This is almost cosmetic enough to not need a catversion bump, but since the opr_sanity regression test has to change in sync with the catalog entry, I figured I'd better do one.
Diffstat (limited to 'src/test/regress/sql/opr_sanity.sql')
-rw-r--r--src/test/regress/sql/opr_sanity.sql7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql
index 8428624582..7fc9915275 100644
--- a/src/test/regress/sql/opr_sanity.sql
+++ b/src/test/regress/sql/opr_sanity.sql
@@ -642,18 +642,17 @@ WHERE p1.amopclaid = 0 OR p1.amopstrategy <= 0 OR p1.amopopr = 0;
SELECT p1.amopclaid, p1.amopopr, p2.oid, p2.amname
FROM pg_amop AS p1, pg_am AS p2, pg_opclass AS p3
WHERE p1.amopclaid = p3.oid AND p3.opcamid = p2.oid AND
- p1.amopstrategy > p2.amstrategies;
+ p1.amopstrategy > p2.amstrategies AND p2.amstrategies <> 0;
-- Detect missing pg_amop entries: should have as many strategy operators
-- as AM expects for each opclass for the AM. When nondefault subtypes are
-- present, enforce condition separately for each subtype.
--- We have to exclude GiST and GIN, unfortunately, since they haven't got
--- any fixed requirements about strategy operators.
+-- We can't check this for AMs with variable strategy sets.
SELECT p1.oid, p1.amname, p2.oid, p2.opcname, p3.amopsubtype
FROM pg_am AS p1, pg_opclass AS p2, pg_amop AS p3
WHERE p2.opcamid = p1.oid AND p3.amopclaid = p2.oid AND
- p1.amname != 'gist' AND p1.amname != 'gin' AND
+ p1.amstrategies <> 0 AND
p1.amstrategies != (SELECT count(*) FROM pg_amop AS p4
WHERE p4.amopclaid = p2.oid AND
p4.amopsubtype = p3.amopsubtype);