Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA14039; Tue, 27 Apr 93 05:39:55 -0700
Date: Tue, 27 Apr 93 05:39:55 -0700
Message-Id: <9304271239.AA14039@postgres.Berkeley.EDU>
From: witr@rwwa.COM
Subject: Re: Several troubles with Postgres.
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Content-Type: text
Content-Length: 842

I also use postgres to store and manupulate data collected from
sensing equipment.  WRT your problems, I suggest workaround:

 >2.- The trouble is that when I call PQsetdb(), if the Postmaster has
  crashed - or in many other errors- the library never returns control
  to my program it gives an error message and then makes an exit(1)

Fork a subprocess to do the data insertion.  You can then do a wait
and find out if it succeeded.

Still, libPQ is somewhat ill designed in it's treatment of errors.
I suggest to the developers that they should examine X11 xlib and
model the libPQ error handling after that.  Error handling should be
entirely under the control of the calling code.
---
 Robert Withrow, Tel: +1 617 598 4480, Fax: +1 617 598 4430, Net: witr@rwwa.COM
 R.W. Withrow Associates, 21 Railroad Ave, Swampscott MA 01907-1821 USA
