Re: inferred param types for PREPARE - Mailing list pgsql-patches

From Tom Lane
Subject Re: inferred param types for PREPARE
Date
Msg-id 17943.1137364386@sss.pgh.pa.us
Whole thread Raw
In response to Re: inferred param types for PREPARE  (Neil Conway <neilc@samurai.com>)
Responses Re: inferred param types for PREPARE
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Woops, good point. Attached is a revised patch that doesn't modify the
> grammar, and includes updates to the documentation and regression tests.

BTW, I wonder whether it wouldn't be a better idea to declare the
pg_prepared_statement view's parameter_types column as regtype[]
instead of oid[].  This would make the default output much more
readable, ie you'd get things like '{integer,boolean}' instead of
'{23,16}'.  Of course you can cast in either direction to get the
other form, but defaulting to text instead of numeric output seems
like it might be a better choice.

The option of casting to get the other form should probably be mentioned
in the view's documentation page, whichever is the default.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: inferred param types for PREPARE
Next
From: Neil Conway
Date:
Subject: Re: patch to create system view that lists cursors