diff options
| author | Tom Lane | 2016-11-29 20:05:22 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-11-29 20:05:22 +0000 |
| commit | ade49c605f1d8f517497829363f8b83f69c73a60 (patch) | |
| tree | 95ac16d5feb33f0fc017c2973e5afee303cdfd95 /contrib/intarray | |
| parent | 11da83a0e70d32ed0e06a5c948cd8343f8ad5102 (diff) | |
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/intarray')
| -rw-r--r-- | contrib/intarray/expected/_int.out | 8 | ||||
| -rw-r--r-- | contrib/intarray/sql/_int.sql | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/contrib/intarray/expected/_int.out b/contrib/intarray/expected/_int.out index 962e5c6a4b1..0a5dd463acb 100644 --- a/contrib/intarray/expected/_int.out +++ b/contrib/intarray/expected/_int.out @@ -1,4 +1,12 @@ CREATE EXTENSION intarray; +-- 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); + amname | opcname +--------+--------- +(0 rows) + SELECT intset(1234); intset -------- diff --git a/contrib/intarray/sql/_int.sql b/contrib/intarray/sql/_int.sql index f6fe2de55c5..44e1a729b4f 100644 --- a/contrib/intarray/sql/_int.sql +++ b/contrib/intarray/sql/_int.sql @@ -1,5 +1,10 @@ CREATE EXTENSION intarray; +-- 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); + SELECT intset(1234); SELECT icount('{1234234,234234}'); SELECT sort('{1234234,-30,234234}'); |
