Fix query checking consistency of table amhandlers in opr_sanity.sql
authorMichael Paquier <[email protected]>
Wed, 22 Nov 2023 00:32:35 +0000 (09:32 +0900)
committerMichael Paquier <[email protected]>
Wed, 22 Nov 2023 00:32:35 +0000 (09:32 +0900)
As written, the query checked for an access method of type 's', which is
not an AM type supported in the core code.

Error introduced by 8586bf7ed888.  As this query is not checking what it
should, backpatch all the way down.

Reviewed-by: Aleksander Alekseev
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 12

src/test/regress/expected/opr_sanity.out
src/test/regress/sql/opr_sanity.sql

index 69475d84303fbfadf33ab1dded2ca70851f6cb51..0b45208f124295ffd5398657836577460f803f0d 100644 (file)
@@ -1886,7 +1886,7 @@ WHERE p2.oid = p1.amhandler AND p1.amtype = 'i' AND
 -- Check for table amhandler functions with the wrong signature
 SELECT p1.oid, p1.amname, p2.oid, p2.proname
 FROM pg_am AS p1, pg_proc AS p2
-WHERE p2.oid = p1.amhandler AND p1.amtype = 's' AND
+WHERE p2.oid = p1.amhandler AND p1.amtype = 't' AND
     (p2.prorettype != 'table_am_handler'::regtype
      OR p2.proretset
      OR p2.pronargs != 1
index 5a9c4796923d65af2d66fb7b5ea9530fa385f895..41dcb9a19008d95cef1e8ff16054711fa70680be 100644 (file)
@@ -1195,7 +1195,7 @@ WHERE p2.oid = p1.amhandler AND p1.amtype = 'i' AND
 
 SELECT p1.oid, p1.amname, p2.oid, p2.proname
 FROM pg_am AS p1, pg_proc AS p2
-WHERE p2.oid = p1.amhandler AND p1.amtype = 's' AND
+WHERE p2.oid = p1.amhandler AND p1.amtype = 't' AND
     (p2.prorettype != 'table_am_handler'::regtype
      OR p2.proretset
      OR p2.pronargs != 1