Re: libpq and prepared statements progress for 8.0

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: libpq and prepared statements progress for 8.0
Дата
Msg-id 414C95FF.8000203@opencloud.com
обсуждение исходный текст
Ответ на Re: libpq and prepared statements progress for 8.0  (David Wheeler <david@kineticode.com>)
Ответы Re: libpq and prepared statements progress for 8.0  (David Wheeler <david@kineticode.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: transaction idle timeout in 7.4.5 and 8.0.0beta2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: transaction idle timeout in 7.4.5 and 8.0.0beta2