Subject: Errors returned from backend

From: Kacper Nowicki <[email-masked]>
Date: Thu, 21 Apr 1994 12:19:41 +0200 (MET DST)

Hi,

I'm writing yet another POTGRES interface. It is based on Tcl/Tk.
I'm still using POSTGRES version 4.1 and I do have following problem : 

I would like to show user error message returned from backend (if PQtty is
properly set it is not logged on backend side). Unfortunately error
message is simply printed to standard error :

pq_getstr(errormsg, error_msg_length);
fprintf(stderr,"%s", errormsg);

and is not accessible from libpq functions level.

I can, of course, rewrite PQexec in libpq but it is not elegant way
to program simple interface with exchanging one of POSTGRES C interface
main parts.

Is this possible to add error reading feature in version 4.2 or maybe
this is already done ?

Kacper

------------------------------------------------------------------------
Kacper Nowicki                         e-mail: [email-masked]
Warsaw University                      =================================
Institute of Experimental Physics
Hoza 69, 00-681 Warszawa               fax: (+48)(22) 294309
Poland                                      (+48) 39121805

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 21 Apr 94 11:13:41 -0700

> and is not accessible from libpq functions level.

PQerrormsg is set a bit more consistently in 4.2.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki