Tom Lane writes:

> * Access to individual fields of an error/notice result; also some setting to
> determine how verbose PQerrorMessage is
>       char *PQerrorField(conn, char fieldcode)
>       char *PQresultErrorField(const PGresult *res, char fieldcode)
> fieldcode is as per the protocol spec.  NULL is returned if no such field in
> current result (this includes case where current result isn't an error).

In the old protocol there used to be support for more then one error
arriving, in which case they were concatenated.  What is happening with

>       PQsetErrorVerbosity(conn, PQERRORS_TERSE/DEFAULT/VERBOSE)
> TERSE: single-line error (severity, primary text, and position only)

Shouldn't the position be available as a separate field, so client
programs can do their own highlighting or whatnot?

> DEFAULT: above plus any detail, hint, or context fields (backwards compatible)
> VERBOSE: all available data

One more thing: It has always annoyed me that PQerrorMessage() returns the
text with a trailing newline.  Since we now redefined newlines to be
paragraph breaks, should this be changed (in a backward-compatible

Peter Eisentraut   [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?


Reply via email to