From ade49c605f1d8f517497829363f8b83f69c73a60 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Nov 2016 15:05:22 -0500 Subject: 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 --- contrib/isn/sql/isn.sql | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'contrib/isn/sql') diff --git a/contrib/isn/sql/isn.sql b/contrib/isn/sql/isn.sql index 5ef6d8aa3be..71577d5590f 100644 --- a/contrib/isn/sql/isn.sql +++ b/contrib/isn/sql/isn.sql @@ -4,6 +4,15 @@ 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); + -- -- test valid conversions -- -- cgit v1.2.3