Subject: pgperl

From: Marc Salomon <[email-masked]>
Date: Fri, 3 Sep 1993 11:50:05 -0700

|Error: No response from the backend, exiting...

Is there any way to catch this from within a pgperl script?

//////////////////////////////////////////////////////////////////////////////
// Marc Salomon                                  e-mail: [email-masked]  \\ 
\\ Software Engineer                                                        //
// Innovative Software Systems Group             phone:  415.476.9541       \\
\\ UCSF Center for Knowledge Management                                     //
// 530 Parnassus SF, CA 94134-0840               fax:    415.476.4653       \\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 06 Sep 93 23:43:59 PDT

> Is there any way to catch this from within a pgperl script?

the good news is that, in general, you should be able to catch 
the backend error message in PQerrormsg after PQexec returns with 
error status.  (and this might actually work in this case.  depending
on the version of pgperl you're using, PQerrormsg might not be
properly set up in the mus file.)

the bad news is that many error messages are not properly loaded
into PQerrormsg by libpq.

the good news is that i diddled libpq so that it would load PQerrormsg
as appropriate and avoid calling exit() under many conditions :-P

the bad news is that the fix is a "wait 'til next release" fix, since
it got caught in some random header restructuring and almost certainly
won't compile under stock 4.1..
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki