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:28:54
Message-ID: 414C9A86.5000808@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-09-18 20:46:16 Re: libpq and prepared statements progress for 8.0
Previous Message David Wheeler 2004-09-18 20:22:50 Re: libpq and prepared statements progress for 8.0

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-09-18 20:46:16 Re: libpq and prepared statements progress for 8.0
Previous Message David Wheeler 2004-09-18 20:22:50 Re: libpq and prepared statements progress for 8.0