diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-11-29 15:05:22 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-11-29 15:05:22 -0500 |
commit | ade49c605f1d8f517497829363f8b83f69c73a60 (patch) | |
tree | 95ac16d5feb33f0fc017c2973e5afee303cdfd95 /contrib/btree_gist/sql | |
parent | 11da83a0e70d32ed0e06a5c948cd8343f8ad5102 (diff) | |
download | postgresql-ade49c605f1d8f517497829363f8b83f69c73a60.tar.gz postgresql-ade49c605f1d8f517497829363f8b83f69c73a60.zip |
Test all contrib-created operator classes with amvalidate.
I'd supposed that people would do this manually when creating new operator
classes, but the folly of that was exposed today. The tests seem fast
enough that we can just apply them during the normal regression tests.
contrib/isn fails the checks for lack of complete sets of cross-type
operators. That's a nice-to-have policy rather than a functional
requirement, so leave it as-is, but insert ORDER BY in the query to
ensure consistent cross-platform output.
Discussion: https://postgr.es/m/7076.1480446837@sss.pgh.pa.us
Diffstat (limited to 'contrib/btree_gist/sql')
-rw-r--r-- | contrib/btree_gist/sql/init.sql | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/btree_gist/sql/init.sql b/contrib/btree_gist/sql/init.sql index afe05346824..a6d2cffc677 100644 --- a/contrib/btree_gist/sql/init.sql +++ b/contrib/btree_gist/sql/init.sql @@ -1 +1,6 @@ CREATE EXTENSION btree_gist; + +-- Check whether any of our opclasses fail amvalidate +SELECT amname, opcname +FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod +WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid); |