| PostgreSQL 8.0.1 Documentation | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Chapter 27. libpq - C Library | Fast Forward | Next |
27.9. Control Functions
These functions control miscellaneous details of libpq's behavior.
PQsetErrorVerbosityDetermines 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-existing PGresult objects, only subsequently-created ones.PQtraceEnables tracing of the client/server communication to a debugging file stream.
void PQtrace(PGconn *conn, FILE *stream); PQuntraceDisables tracing started by
PQtrace.void PQuntrace(PGconn *conn);