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

From David Wheeler
Subject Re: libpq and prepared statements progress for 8.0
Date
Msg-id 94141820-0ABD-11D9-BC11-000A95B9602E@kineticode.com
Whole thread Raw
In response to Re: libpq and prepared statements progress for 8.0  (Abhijit Menon-Sen <ams@oryx.com>)
List pgsql-hackers
On Sep 19, 2004, at 9:13 PM, Abhijit Menon-Sen wrote:

> OK, how about adding a PQprepare (PQcreatePrepared?) function like 
> this?
>
>     PGresult *
>     PQprepare(PGconn *conn,
>               const char *stmtName,
>               const char *query,
>               int nParams,
>               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.

Sounds damn good to me, Abhihit, thanks!

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

Woot! :-)

Regards,

David



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: libpq and prepared statements progress for 8.0
Next
From: Tom F
Date:
Subject: execve() vs system() for chrooted filesystems in dbcommands.c