Re: About the parameter of API: PQprepared

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: iihero <iihero(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: About the parameter of API: PQprepared
Date: 2008-09-26 18:42:16
Message-ID: b42b73150809261142i610a75e6l7fe73a734f13016b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 26, 2008 at 2:45 AM, iihero <iihero(at)gmail(dot)com> wrote:
> In libpq, the definition is like:
> PGresult *
> PQprepare(PGconn *conn,
> const char *stmtName, const char *query,
> int nParams, const Oid *paramTypes)
>
> Could we remove the parameter "nParams"?
> e.g. "insert into foo(id, name, address) values ($1, $2, $3)"
> PostgreSQL possibly can parse the prepared sql statement to get the real
> paramters count.
>
> Or, is there another alternate way?

if you are looking for easier way to do things like prepared
statements, etc. over libpq, you may want to look at libpqtypes (it's
a external library that will require a patched libpq for versions
<8.4):

http://libpqtypes.esilo.com/

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-09-26 19:24:25 Re: lock contention on parallel COPY ?
Previous Message Simon Riggs 2008-09-26 18:27:46 Re: lock contention on parallel COPY ?