About the parameter of API: PQprepared - Mailing list pgsql-hackers

From iihero
Subject About the parameter of API: PQprepared
Date
Msg-id f119e28b0809252345j6d224142tf29a97270ecd9011@mail.gmail.com
Whole thread Raw
Responses Re: About the parameter of API: PQprepared  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: About the parameter of API: PQprepared  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-hackers
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?

pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches
Next
From: KaiGai Kohei
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches