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 414C95FF.8000203@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  (David Wheeler <david@kineticode.com>)
List pgsql-hackers
David Wheeler wrote:
> On Sep 17, 2004, at 6:23 PM, Oliver Jowett wrote:
> 
>>> template1=> prepare s1(int) as select typname from pg_type where oid 
>>> = $1;
>>> PREPARE
>>> template1=> execute s1('16');
>>>  typname ---------
>>>  bool
>>> (1 row)
> 
> 
> You're still telling it the type via that int.

Well, obviously. I haven't modified the backend code to accept 'unknown' 
in PREPARE..

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.

-O


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: transaction idle timeout in 7.4.5 and 8.0.0beta2
Next
From: Tom Lane
Date:
Subject: Re: transaction idle timeout in 7.4.5 and 8.0.0beta2