PQescapeLiteral(), PQescapeIdentifier() documented with invalid signatures.

Started by Dmitriy Igrishinover 15 years ago2 messagesdocs
Jump to latest
#1Dmitriy Igrishin
dmitigr@gmail.com

Hey all,

Actual signatures of libpq's functions PQescapeLiteral(),
PQescapeIdentifier()
is
char *PQescapeLiteral(PGconn *conn, const char *str, size_t len)
char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len)

that differs from signatures provided in the documentation here

http://www.postgresql.org/docs/9.0/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING

Regards,
Dmitriy

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dmitriy Igrishin (#1)
Re: PQescapeLiteral(), PQescapeIdentifier() documented with invalid signatures.

Dmitriy Igrishin <dmitigr@gmail.com> writes:

Actual signatures of libpq's functions PQescapeLiteral(),
PQescapeIdentifier()
is
char *PQescapeLiteral(PGconn *conn, const char *str, size_t len)
char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len)

that differs from signatures provided in the documentation here
http://www.postgresql.org/docs/9.0/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING

Wow ... I can understand missing the "const" declarations, but getting
the return type wrong is pretty bad :-(. Amazing nobody caught this
before. Thanks, will fix!

regards, tom lane