]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix query checking consistency of table amhandlers in opr_sanity.sql
authorMichael Paquier <michael@paquier.xyz>
Wed, 22 Nov 2023 00:32:42 +0000 (09:32 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 22 Nov 2023 00:32:42 +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/ZVxJkAJrKbfHETiy@paquier.xyz
Backpatch-through: 12

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

index 500184c1c567892bf2440840c3570d2d7f4d92e3..e85aa4134634da53c7f97e707c476d46508e3dd9 100644 (file)
@@ -1848,7 +1848,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 624bea46cea10be15a8a84ace452f622b426636d..cb64d7d77c378e2113fd663b8c5ac8a92e6494c9 100644 (file)
@@ -1213,7 +1213,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