Re: libpq and prepared statements progress for 8.0

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: Rudy Lippan <rlippan(at)remotelinux(dot)com>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: libpq and prepared statements progress for 8.0
Date: 2004-09-18 20:09:35
Message-ID: 414C95FF.8000203@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-09-18 20:09:43 Re: transaction idle timeout in 7.4.5 and 8.0.0beta2
Previous Message Tom Lane 2004-09-18 20:05:26 Re: transaction idle timeout in 7.4.5 and 8.0.0beta2

Browse pgsql-patches by date

  From Date Subject
Next Message David Wheeler 2004-09-18 20:22:50 Re: libpq and prepared statements progress for 8.0
Previous Message David Wheeler 2004-09-18 17:28:54 Re: libpq and prepared statements progress for 8.0