Thread: libpq (PQprepared)
Hey all,
The description of PQprepare() of libpq
(http://www.postgresql.org/docs/9.0/static/libpq-exec.html)
says:
(But
types to be pre-specified.)
But the description of PREPARE
(http://www.postgresql.org/docs/9.0/static/sql-prepare.html)
says:
The data type of a parameter to the prepared statement. If the data
type of a particular parameter is unspecified or is specified as unknown,
it will be inferred from the context in which the parameter is used.
So, PQprepare() is NOT more flexible in this case because PREPARE
does not require parameters types to be pre-specifies also.
Regards,
Dmitriy
The description of PQprepare() of libpq
(http://www.postgresql.org/docs/9.0/static/libpq-exec.html)
says:
(But
PQprepare
is more flexible since it does not require parametertypes to be pre-specified.)
But the description of PREPARE
(http://www.postgresql.org/docs/9.0/static/sql-prepare.html)
says:
The data type of a parameter to the prepared statement. If the data
type of a particular parameter is unspecified or is specified as unknown,
it will be inferred from the context in which the parameter is used.
So, PQprepare() is NOT more flexible in this case because PREPARE
does not require parameters types to be pre-specifies also.
Regards,
Dmitriy
Dmitriy Igrishin <dmitigr@gmail.com> writes: > The description of PQprepare() of libpq > (http://www.postgresql.org/docs/9.0/static/libpq-exec.html) > says: > (But PQprepare is more flexible since it does not require parameter > types to be pre-specified.) > But the description of PREPARE > (http://www.postgresql.org/docs/9.0/static/sql-prepare.html) > says: > The data type of a parameter to the prepared statement. If the data > type of a particular parameter is unspecified or is specified as unknown, > it will be inferred from the context in which the parameter is used. > So, PQprepare() is NOT more flexible in this case because PREPARE > does not require parameters types to be pre-specifies also. Hmmm ... it was true when written, but is out of date now. AFAICS it's sufficient to just remove the parenthetical remark. regards, tom lane