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 24492.1095453170@sss.pgh.pa.us
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>)
Re: libpq and prepared statements progress for 8.0  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-hackers
David Wheeler <david@kineticode.com> writes:
> To get initial PREPARE support, I don't think that the other DBD::Pg 
> developers mind sending strings to the PostgreSQL server in a SQL 
> PREPARE statement.

> The question, in my mind, is it currently possible to do this without 
> specifying the type of every placeholder?

Well, that's the problem: you can't.  The SQL PREPARE command doesn't
have any provision for dealing with unspecified parameters.  I think
this is reasonable since if it could, it would still have no way to tell
you what it resolved the parameter types as.  The shortcoming here is
really in libpq and not in the backend: the protocol-level Parse
operation *is* designed to handle this scenario, but libpq isn't letting
you get at it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Disabling bgwriter on my notebook
Next
From: David Wheeler
Date:
Subject: Re: libpq and prepared statements progress for 8.0