diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/opr_sanity.out | 12 | ||||
-rw-r--r-- | src/test/regress/sql/opr_sanity.sql | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out index a8aecd1dee6..b4d7d70d59c 100644 --- a/src/test/regress/expected/opr_sanity.out +++ b/src/test/regress/expected/opr_sanity.out @@ -940,6 +940,18 @@ WHERE p2.opfmethod = p1.oid AND p3.amprocfamily = p2.oid AND --------+---------+----------------+----------------- (0 rows) +-- Also, check if there are any pg_opclass entries that don't seem to have +-- pg_amproc support. +SELECT amname, opcname, count(*) +FROM pg_am am JOIN pg_opclass op ON opcmethod = am.oid + LEFT JOIN pg_amproc p ON amprocfamily = opcfamily AND + amproclefttype = amprocrighttype AND amproclefttype = opcintype +GROUP BY amname, amsupport, opcname, amprocfamily +HAVING count(*) != amsupport OR amprocfamily IS NULL; + amname | opcname | count +--------+---------+------- +(0 rows) + -- Unfortunately, we can't check the amproc link very well because the -- signature of the function may be different for different support routines -- or different base data types. diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql index 54c60c1a6d9..037eb9e74db 100644 --- a/src/test/regress/sql/opr_sanity.sql +++ b/src/test/regress/sql/opr_sanity.sql @@ -751,6 +751,16 @@ WHERE p2.opfmethod = p1.oid AND p3.amprocfamily = p2.oid AND p4.amproclefttype = p3.amproclefttype AND p4.amprocrighttype = p3.amprocrighttype); +-- Also, check if there are any pg_opclass entries that don't seem to have +-- pg_amproc support. + +SELECT amname, opcname, count(*) +FROM pg_am am JOIN pg_opclass op ON opcmethod = am.oid + LEFT JOIN pg_amproc p ON amprocfamily = opcfamily AND + amproclefttype = amprocrighttype AND amproclefttype = opcintype +GROUP BY amname, amsupport, opcname, amprocfamily +HAVING count(*) != amsupport OR amprocfamily IS NULL; + -- Unfortunately, we can't check the amproc link very well because the -- signature of the function may be different for different support routines -- or different base data types. |