Re: the parsing of parameters - Mailing list pgsql-hackers

From Tom Lane
Subject Re: the parsing of parameters
Date
Msg-id 23311.1020981001@sss.pgh.pa.us
Whole thread Raw
In response to Re: the parsing of parameters  (Jan Wieck <janwieck@yahoo.com>)
Responses Re: the parsing of parameters  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-hackers
Jan Wieck <janwieck@yahoo.com> writes:
>     I  have  a little patch that actually allows SPI_prepare() to
>     use UNKNOWN_OID in the passed in  parameter  type  array  and
>     put's the choosen datatypes Oid back into there.

>     The   parser  treats  those  parameters  like  single  quoted
>     literals of unknown type and chooses what would be  the  most
>     useful datatype here.

>     Any objections?

For this particular application, at least, I do not see the value ...
in fact this seems more likely to break stuff than help.  If the
application does not know what the datatypes are supposed to be,
how is it going to call the prepared statement?

You could possibly get away with that for a textual interface ("always
pass quoted literals"), but it would surely destroy any chance of having
a binary protocol for passing parameters to prepared statements.

Offhand I'm having a hard time visualizing why you'd want this at
the SPI_prepare level, either ... what's the application?
        regards, tom lane


pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: Re: Issues tangential to win32 support
Next
From: "Dann Corbit"
Date:
Subject: Re: Issues tangential to win32 support