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

From Abhijit Menon-Sen
Subject Re: libpq and prepared statements progress for 8.0
Date
Msg-id 20040920041309.GB4503@penne.toroid.org
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  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
At 2004-09-17 14:28:36 -0700, david@kineticode.com wrote:
>
> > Assuming that anyone steps up and does the work, that is.
> 
> So...any volunteers?

OK, how about adding a PQprepare (PQcreatePrepared?) function like this?
   PGresult *   PQprepare(PGconn *conn,             const char *stmtName,             const char *query,
intnParams,             const Oid *paramTypes)   {       ...
 

PQprepare would construct a Parse message to create a prepared statement
named stmtName from the given query, with nParams types pre-declared. It
could be called by DBD::Pg with nParams == 0 to let the server infer all
of the parameter types.

I suppose an asynchronous equivalent would also be needed.
(Yes, I'm volunteering to write both functions.)

-- ams


pgsql-hackers by date:

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