Re: How do I save data and then raise an exception? - Mailing list pgsql-general

From Rob Richardson
Subject Re: How do I save data and then raise an exception?
Date
Msg-id 04A6DB42D2BA534FAC77B90562A6A03DA95EFC@server.rad-con.local
Whole thread Raw
In response to Re: How do I save data and then raise an exception?  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: How do I save data and then raise an exception?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-general
No, because the application first saves the coils and then saves the
charge.  Setting up the foreign key constraint would prevent any coils
from being saved because the charge record would never exist at the time
the coil record was created.

RobR, who would love to hear some of the music in Galway Cathedral!

-----Original Message-----
From: Raymond O'Donnell [mailto:rod@iol.ie]
Sent: Friday, October 03, 2008 10:53 AM
To: Rob Richardson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?

On 03/10/2008 14:52, Rob Richardson wrote:
> That's how it should have been done, but it wasn't.  It's too late to
> change it now.  If I make any change to the C++ code, I run into a

But setting up a foreign key constrain is something you do in the
database, not in the app - can't you do that?

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie Galway Cathedral Recitals:
http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: How do I save data and then raise an exception?
Next
From: Alvaro Herrera
Date:
Subject: Re: Getting rows in statement-level triggers