1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Fix pg_prepared_statements.result_types for DML statements

Amendment to 84ad713cf8: 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.
This commit is contained in:
Peter Eisentraut
2022-07-05 10:26:36 +02:00
parent e3dd7c06e6
commit 6ffff0fd22
4 changed files with 26 additions and 7 deletions

View File

@ -11511,6 +11511,8 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
form of an array of <type>regtype</type>. The OID corresponding
to an element of this array can be obtained by casting the
<type>regtype</type> value to <type>oid</type>.
If the prepared statement does not provide a result (e.g., a DML
statement), then this field will be null.
</para></entry>
</row>