From 6ffff0fd225432fe2ae4bd5abb7ff6113e255418 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 5 Jul 2022 10:26:36 +0200 Subject: Fix pg_prepared_statements.result_types for DML statements Amendment to 84ad713cf85aeffee5dd39f62d49a1b9e34632da: Not all prepared statements have a result descriptor. As currently coded, this would crash when reading pg_prepared_statements. Make those cases return null for result_types instead. Also add a test case for it. --- doc/src/sgml/catalogs.sgml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index ef7ae7e8fdc..4f3f375a84a 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -11511,6 +11511,8 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx form of an array of regtype. The OID corresponding to an element of this array can be obtained by casting the regtype value to oid. + If the prepared statement does not provide a result (e.g., a DML + statement), then this field will be null. -- cgit v1.2.3