Re: How do I save data and then raise an exception?

From: "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I save data and then raise an exception?
Date: 2008-10-03 14:56:02
Message-ID: 04A6DB42D2BA534FAC77B90562A6A03DA95EFC@server.rad-con.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)iol(dot)ie]
Sent: Friday, October 03, 2008 10:53 AM
To: Rob Richardson
Cc: pgsql-general(at)postgresql(dot)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(at)iol(dot)ie Galway Cathedral Recitals:
http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2008-10-03 16:06:05 Re: Getting rows in statement-level triggers
Previous Message Raymond O'Donnell 2008-10-03 14:53:06 Re: How do I save data and then raise an exception?