Re: [HACKERS] About the parameter of API: PQprepared

2008-09-26 Thread Andrew Chernow
Merlin Moncure wrote: On Fri, Sep 26, 2008 at 2:45 AM, iihero <[EMAIL PROTECTED]> 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. "inser

Re: [HACKERS] About the parameter of API: PQprepared

2008-09-26 Thread Merlin Moncure
On Fri, Sep 26, 2008 at 2:45 AM, iihero <[EMAIL PROTECTED]> 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

Re: [HACKERS] About the parameter of API: PQprepared

2008-09-26 Thread Tom Lane
iihero <[EMAIL PROTECTED]> writes: > 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"? No. We are not going to break every existing user of t

[HACKERS] About the parameter of API: PQprepared

2008-09-25 Thread iihero
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 prepare