Re: the parsing of parameters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <janwieck(at)yahoo(dot)com>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: the parsing of parameters
Date: 2002-05-09 21:50:01
Message-ID: 23311.1020981001@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck <janwieck(at)yahoo(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-05-09 21:51:50 Re: Issues tangential to win32 support
Previous Message mlw 2002-05-09 21:41:29 Re: Issues tangential to win32 support