Re: libpq and prepared statements progress for 8.0 - Mailing list pgsql-hackers

From Oliver Jowett
Subject Re: libpq and prepared statements progress for 8.0
Date
Msg-id 414C9A86.5000808@opencloud.com
Whole thread Raw
In response to Re: libpq and prepared statements progress for 8.0  (David Wheeler <david@kineticode.com>)
Responses Re: libpq and prepared statements progress for 8.0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
David Wheeler wrote:
> On Sep 18, 2004, at 1:09 PM, Oliver Jowett wrote:
> 
>> Well, obviously. I haven't modified the backend code to accept 
>> 'unknown' in PREPARE..
> 
> 
> Right, and that's what we're looking for.
> 
>> My point was the client does *not* need to know the type inferred by 
>> the PREPARE in the 'unknown' case to make use of the resulting 
>> statement. It can pass all parameters as text and use the type 
>> inference that happens on EXECUTE -- as is happening in the EXECUTE 
>> quoted above.
> 
> 
> Yes, that's fine, but it's PREPARE that's at issue here, not EXECUTE.

I think you misunderstand what I'm saying.

Tom reckons that PREPARE (at the SQL level) taking unknown types is not 
useful as there is no feedback mechanism along the lines of the V3 
protocol Describe messages to let the client find out what types were 
inferred by the PREPARE.

I am saying this doesn't matter as the client can still use the 
resulting statement just fine without knowing the types. So allowing 
'unknown' in PREPARE *is* useful.

Not that I'm volunteering to implement it, though -- the JDBC driver 
does not need this functionality and I'm way too short on time anyway :(

-O


pgsql-hackers by date:

Previous
From: David Wheeler
Date:
Subject: Re: libpq and prepared statements progress for 8.0
Next
From: Tom Lane
Date:
Subject: Re: libpq and prepared statements progress for 8.0