CREATE EXTENSION btree_gin;
+-- 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)
+
CREATE EXTENSION btree_gin;
+
+-- 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);
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);
+ amname | opcname
+--------+---------
+(0 rows)
+
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);
-- Test citext datatype
--
CREATE EXTENSION citext;
+-- 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)
+
-- Test the operators and indexing functions
-- Test = and <>.
SELECT 'a'::citext = 'a'::citext AS t;
-- Test citext datatype
--
CREATE EXTENSION citext;
+-- 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)
+
-- Test the operators and indexing functions
-- Test = and <>.
SELECT 'a'::citext = 'a'::citext AS t;
CREATE EXTENSION citext;
+-- 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);
+
-- Test the operators and indexing functions
-- Test = and <>.
-- Test cube datatype
--
CREATE EXTENSION cube;
+-- 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)
+
--
-- testing the input and output functions
--
-- Test cube datatype
--
CREATE EXTENSION cube;
+-- 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)
+
--
-- testing the input and output functions
--
CREATE EXTENSION cube;
+-- 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);
+
--
-- testing the input and output functions
--
CREATE EXTENSION hstore;
+-- 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)
+
set escape_string_warning=off;
--hstore;
select ''::hstore;
CREATE EXTENSION hstore;
+-- 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);
+
set escape_string_warning=off;
--hstore;
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
--------
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}');
-- 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
--
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
--
CREATE EXTENSION ltree;
+-- 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 ''::ltree;
ltree
-------
CREATE EXTENSION ltree;
+-- 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 ''::ltree;
SELECT '1'::ltree;
SELECT '1.2'::ltree;
CREATE EXTENSION pg_trgm;
+-- 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 show_trgm('');
show_trgm
-----------
CREATE EXTENSION pg_trgm;
+-- 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 show_trgm('');
select show_trgm('(*&^$@%@');
select show_trgm('a b c');
-- Test seg datatype
--
CREATE EXTENSION seg;
+-- 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)
+
--
-- testing the input and output functions
--
-- Test seg datatype
--
CREATE EXTENSION seg;
+-- 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)
+
--
-- testing the input and output functions
--
CREATE EXTENSION seg;
+-- 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);
+
--
-- testing the input and output functions
--
CREATE EXTENSION tsearch2;
+-- 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)
+
--tsvector
SELECT '1'::tsvector;
tsvector
CREATE EXTENSION tsearch2;
+-- 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);
+
--tsvector
SELECT '1'::tsvector;
SELECT '1 '::tsvector;