Re: the parsing of parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: the parsing of parameters
Дата
Msg-id 23311.1020981001@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: the parsing of parameters  (Jan Wieck <janwieck@yahoo.com>)
Ответы Re: the parsing of parameters  (Jan Wieck <janwieck@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: mlw
Дата:
Сообщение: Re: Issues tangential to win32 support
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: Issues tangential to win32 support