| PostgreSQL Reference Manual - Volume 2 - Programming Guide by The PostgreSQL Global Development Group Paperback (6"x9"), 408 pages ISBN 0954612035 RRP £19.95 ($34.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
1.9 Control Functions
These functions control miscellaneous details of libpq's behavior.
PQsetErrorVerbosity-
Determines the verbosity of messages returned by
PQerrorMessageandPQresultErrorMessage.typedef enum { PQERRORS_TERSE, PQERRORS_DEFAULT, PQERRORS_VERBOSE } PGVerbosity; PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity);PQsetErrorVerbositysets the verbosity mode, returning the connection's previous setting. In TERSE mode, returned messages include severity, primary text, and position only; this will normally fit on a single line. The default mode produces messages that include the above plus any detail, hint, or context fields (these may span multiple lines). The VERBOSE mode includes all available fields. Changing the verbosity does not affect the messages available from already-existingPGresultobjects, only subsequently-created ones. PQtrace-
Enables tracing of the client/server communication to a debugging file stream.
void PQtrace(PGconn *conn, FILE *stream);
Note: On Windows, if the libpq library and an application are compiled with different flags, this function call will crash the application because the internal representation of the
FILEpointers differ. Specifically, multithreaded/single-threaded, release/debug, and static/dynamic flags should be the same for the library and all applications using that library. PQuntrace-
Disables tracing started by
PQtrace.void PQuntrace(PGconn *conn);
| ISBN 0954612035 | PostgreSQL Reference Manual - Volume 2 - Programming Guide | See the print edition |