1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-20 05:13:53 +03:00

Fix query checking consistency of table amhandlers in opr_sanity.sql

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
This commit is contained in:
Michael Paquier 2023-11-22 09:32:06 +09:00
parent 3af101ce8b
commit 2f30226624
2 changed files with 2 additions and 2 deletions

View File

@ -1920,7 +1920,7 @@ WHERE p1.oid = a1.amhandler AND a1.amtype = 'i' AND
-- Check for table amhandler functions with the wrong signature -- Check for table amhandler functions with the wrong signature
SELECT a1.oid, a1.amname, p1.oid, p1.proname SELECT a1.oid, a1.amname, p1.oid, p1.proname
FROM pg_am AS a1, pg_proc AS p1 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 (p1.prorettype != 'table_am_handler'::regtype
OR p1.proretset OR p1.proretset
OR p1.pronargs != 1 OR p1.pronargs != 1

View File

@ -1223,7 +1223,7 @@ WHERE p1.oid = a1.amhandler AND a1.amtype = 'i' AND
SELECT a1.oid, a1.amname, p1.oid, p1.proname SELECT a1.oid, a1.amname, p1.oid, p1.proname
FROM pg_am AS a1, pg_proc AS p1 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 (p1.prorettype != 'table_am_handler'::regtype
OR p1.proretset OR p1.proretset
OR p1.pronargs != 1 OR p1.pronargs != 1