Subject: How can i handle the error message?

From: [email-masked] (Jeong Junyoung)
Date: Wed, 8 Mar 95 17:30:24 KST

Hello...

How can i get error message from backend use libpq library??

I make some program use libpq lib. Then i have some problem.
Backend returns error message when a query failed ..
i guess backend send message through STDERR.
however I would like to handle messages ..
How can i do it??

		thanks in advance!!

J.Y. Jeong

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]".
   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/

---

From: Robert Patrick <[email-masked]>
Date: Wed, 08 Mar 1995 10:15:27 -0500

>however I would like to handle messages ..

There is a description of how to handle errors in the libpq section of the 
Postgres reference manual.  Basically, the first character of the string 
returned from PQexec() gives the return status of the function call (E and R 
are errors).  When an error occurs, the error message is stored in PQerrormsg.

You might take a look at bin/monitor/monitor.c in the Postgres source tree for 
an example of the proper way to handle errors.

Robert

--
+------------------------------------------------------------------------+
| Robert Patrick ([email-masked]) Engineering Design Research Center |
| n-dim Group                                 Carnegie Mellon University |
| World Wide Web: http://paneer.ndim.edrc.cmu.edu:8888/~rp2y/Home.html   |
+------------------------------------------------------------------------+