On Tuesday, December 31, 2002, at 06:41 PM, Bill Kurland wrote:
I've checked a couple of PostgreSQL books and the online docs as wellI would post a query to the pgsql-general list asking about references to documentation of error messages.
as the web but haven't found any kind of list of the possibilities. It
would seem that if it were useful to know them someone would have documented it, so I am wondering if I am just approaching the problem of error messages the wrong way. Yet I don't see how you can deal with errors unless you know what the errors can possibly be, short of > trying
to make force every error possible and looking at the resulting string.
It's not necessary to have to check all of the error messages individually. Just set RaiseError to a true value and eval all of your statements. Usually there'll only be a few different errors that you'll commonly see, and you can check for those, but otherwise, just give your users a generic error and log the PostgreSQL errors somewhere where you can figure out what went wrong later.Can anyone suggest a different approach ?
HTH,
David
--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: [EMAIL PROTECTED]
