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

From Tom Lane
Subject Re: libpq and prepared statements progress for 8.0
Date
Msg-id 9329.1095540376@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq and prepared statements progress for 8.0  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: libpq and prepared statements progress for 8.0  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Oliver Jowett <oliver@opencloud.com> writes:
> 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.

Well, that was not quite my point, but I guess I wasn't clear.  My
reasoning was more like this:
1. What we have now doesn't do what DBD::Pg needs.
2. We can fix it with some-small-amount-of-work in libpq (to add some API),  or with
some-probably-also-small-amount-of-workin the backend (to  kluge up SQL PREPARE to allow "unknown").
 
3. The libpq-side solution is more generally useful, because it can support  feedback about the resolved datatypes.
4. Therefore, we should fix it in libpq.

Note that point 3 is not dependent on whether DBD::Pg in particular
needs this functionality --- somebody out there certainly will.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: libpq and prepared statements progress for 8.0
Next
From: "Michael Paesold"
Date:
Subject: SAVEPOINT SQL conformance