1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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
This commit is contained in:
Tom Lane
2016-11-29 15:05:22 -05:00
parent 11da83a0e7
commit ade49c605f
25 changed files with 207 additions and 0 deletions

View File

@ -2,6 +2,50 @@
-- Test ISN extension
--
CREATE EXTENSION isn;
-- Check whether any of our opclasses fail amvalidate
-- ... they will, because of missing cross-type operators
SELECT amname, opcname
FROM (SELECT amname, opcname, opc.oid
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
WHERE opc.oid >= 16384
ORDER BY 1, 2 OFFSET 0) ss
WHERE NOT amvalidate(oid);
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: btree operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
INFO: hash operator family "isn_ops" is missing cross-type operator(s)
amname | opcname
--------+------------
btree | ean13_ops
btree | isbn13_ops
btree | isbn_ops
btree | ismn13_ops
btree | ismn_ops
btree | issn13_ops
btree | issn_ops
btree | upc_ops
hash | ean13_ops
hash | isbn13_ops
hash | isbn_ops
hash | ismn13_ops
hash | ismn_ops
hash | issn13_ops
hash | issn_ops
hash | upc_ops
(16 rows)
--
-- test valid conversions
--