Fix query checking consistency of table amhandlers in opr_sanity.sql
authorMichael Paquier <[email protected]>
Wed, 22 Nov 2023 00:32:06 +0000 (09:32 +0900)
committerMichael Paquier <[email protected]>
Wed, 22 Nov 2023 00:32:06 +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, back all the way down.

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

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

index 7a6f36a6a9a8ff29ca2568e636de902281857e60..7610b011d686fd44f91c99d9fe9931b2023743cf 100644 (file)
@@ -1920,7 +1920,7 @@ WHERE p1.oid = a1.amhandler AND a1.amtype = 'i' AND
 -- Check for table amhandler functions with the wrong signature
 SELECT a1.oid, a1.amname, p1.oid, p1.proname
 FROM pg_am AS a1, pg_proc AS p1
-WHERE p1.oid = a1.amhandler AND a1.amtype = 's' AND
+WHERE p1.oid = a1.amhandler AND a1.amtype = 't' AND
     (p1.prorettype != 'table_am_handler'::regtype
      OR p1.proretset
      OR p1.pronargs != 1
index e2d2c70d70679c1e23d153b06940de21bd406dcb..2fe7b6dcc498668eb73823a6a689dc300b425515 100644 (file)
@@ -1223,7 +1223,7 @@ WHERE p1.oid = a1.amhandler AND a1.amtype = 'i' AND
 
 SELECT a1.oid, a1.amname, p1.oid, p1.proname
 FROM pg_am AS a1, pg_proc AS p1
-WHERE p1.oid = a1.amhandler AND a1.amtype = 's' AND
+WHERE p1.oid = a1.amhandler AND a1.amtype = 't' AND
     (p1.prorettype != 'table_am_handler'::regtype
      OR p1.proretset
      OR p1.pronargs != 1