pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] Add result_types column to pg_prepared_statements view
Date: Tue, 5 Jul 2022 11:20:53 +0200
Message-ID: <6e806480-5414-f4bb-0ff5-620d08eebff7@enterprisedb.com> (raw)
In-Reply-To: <dd516b54-76b8-40ab-a39f-16c64571e537@www.fastmail.com>
References: <871qwpo7te.fsf@wibble.ilmari.org>
	<58307e2c-a26c-d438-27f7-5bef9f693943@enterprisedb.com>
	<87v8shj9w7.fsf@wibble.ilmari.org>
	<5a1f587b-0d89-3ade-ea7e-4878e1d3e144@enterprisedb.com>
	<dd516b54-76b8-40ab-a39f-16c64571e537@www.fastmail.com>

On 05.07.22 09:31, Dagfinn Ilmari Mannsåker wrote:
> On Tue, 5 Jul 2022, at 06:34, Peter Eisentraut wrote:
>> On 01.07.22 14:27, Dagfinn Ilmari Mannsåker wrote:
>>> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>>>
>>>> On 19.05.22 17:34, Dagfinn Ilmari Mannsåker wrote:
>>>>> Prompted by a question on IRC, here's a patch to add a result_types
>>>>> column to the pg_prepared_statements view, so that one can see the types
>>>>> of the columns returned by a prepared statement, not just the parameter
>>>>> types.
>>>>> I'm not quite sure about the column name, suggestions welcome.
>>>>
>>>> I think this patch is sensible.
>>
>>> The arguments about client-side type-specific value handling for
>>> RowDescription don't apply here IMO, since this view is more
>>> user-facing.
>>
>> I agree.  It's also easy to change if needed.  Committed as is.
> 
> Thanks!

There was a problem that we didn't cover: Not all prepared statements 
have result descriptors (e.g., DML statements), so that would crash as 
written.  I have changed it to return null for result_types in that 
case, and added a test case.





view thread (8+ messages)  latest in thread

Message-ID: <6e806480-5414-f4bb-0ff5-620d08eebff7@enterprisedb.com>
Permalink:  ../6e806480-5414-f4bb-0ff5-620d08eebff7@enterprisedb.com/
Also on:    postgresql.org/message-id/6e806480-5414-f4bb-0ff5-620d08eebff7@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, ilmari@ilmari.org, tgl@sss.pgh.pa.us
  Subject: Re: [PATCH] Add result_types column to pg_prepared_statements view
  In-Reply-To: <6e806480-5414-f4bb-0ff5-620d08eebff7@enterprisedb.com>
  References: <871qwpo7te.fsf@wibble.ilmari.org> <58307e2c-a26c-d438-27f7-5bef9f693943@enterprisedb.com> <87v8shj9w7.fsf@wibble.ilmari.org> <5a1f587b-0d89-3ade-ea7e-4878e1d3e144@enterprisedb.com> <dd516b54-76b8-40ab-a39f-16c64571e537@www.fastmail.com> <6e806480-5414-f4bb-0ff5-620d08eebff7@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox