Skip site navigation (1) Skip section navigation (2)

Re: Some quick notes about extending libpq for new

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Some quick notes about extending libpq for new
Date: 2003-06-16 14:51:16
Message-ID: Pine.LNX.4.44.0306161602130.2751-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
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
that?

> 	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
fashion)?

-- 
Peter Eisentraut   peter_e(at)gmx(dot)net


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-06-16 15:13:42
Subject: Re: Some quick notes about extending libpq for new protocol
Previous:From: Peter EisentrautDate: 2003-06-16 14:51:04
Subject: Re: 7.3.3 COMPILE FAILURE: pg_dump (fwd)

pgsql-interfaces by date

Next:From: Tom LaneDate: 2003-06-16 15:13:42
Subject: Re: Some quick notes about extending libpq for new protocol
Previous:From: Tom LaneDate: 2003-06-16 13:22:11
Subject: Re: ECPG CVS version problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group