-
From: Scott Marlowe [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2008 4:59 PM
To: Rob Richardson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?
On Fri, Oct 3, 2008 at 1:48 PM, Rob Richardson
[EMAIL PROTECTED] wrote:
I didn't see
From: Jaime Casanova [mailto:[EMAIL PROTECTED]
Sent: Thu 10/2/2008 10:11 PM
To: Alvaro Herrera
Cc: Rob Richardson; pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?
On Thu, Oct 2, 2008 at 8:44 PM, Alvaro Herrera
[EMAIL PROTECTED] wrote:
Rob
Rob Richardson [EMAIL PROTECTED] writes:
I think I just came up with a thoroughly ugly idea. The database
supports an annealing shop, in which coils are assigned to charges.
After the check fails, I end up with coils assigned to a charge that
does not exist. I could set up a job that runs
I save data and then raise an exception?
Rob Richardson [EMAIL PROTECTED] writes:
I think I just came up with a thoroughly ugly idea. The database
supports an annealing shop, in which coils are assigned to charges.
After the check fails, I end up with coils assigned to a charge that
does
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?
in Galway Cathedral!
-Original Message-
From: Raymond O'Donnell [mailto:[EMAIL PROTECTED]
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
I'm thinking of a
Python script, of which there are several running on site.
RobR
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2008 8:47 AM
To: Rob Richardson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How do I save data
My thanks to all who contributed thoughts about my question. I have put
a two-part solution into place. The trigger function that fires when
charges are inserted raises the exception, but leaves the possibility of
dangling coils (coils with the numbers of charges that do not exist in
the
On Fri, Oct 3, 2008 at 8:56 AM, Rob Richardson
[EMAIL PROTECTED] wrote:
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
@postgresql.org
Subject: Re: [GENERAL] How do I save data and then raise an exception?
On Fri, Oct 3, 2008 at 8:56 AM, Rob Richardson
[EMAIL PROTECTED] wrote:
No, because the application first saves the coils and then saves the
charge. Setting up the foreign key constraint would prevent any
On Fri, Oct 3, 2008 at 1:48 PM, Rob Richardson
[EMAIL PROTECTED] wrote:
I didn't see anything in the documentation about deferred constraints.
Can you point to someplace where I can read about them?
http://www.postgresql.org/docs/8.3/static/sql-createtable.html
--
Sent via pgsql-general
Greetings!
The people who originally wrote the system I'm trying to work with did
not know as much as they should have about working with databases, so
I'm stuck with the following situation:
The applicaton is written in C++ (MS Visual C++ 6, Windows XP, in case
it matters). At one point, a
Rob Richardson wrote:
Here's what I need to do:
IF query_check_fails THEN
UPDATE some_table SET some_value = 0 WHERE some_condition_is_true;
RAISE EXCEPTION 'Look, you idiot, do it right next time!';
END;
I need the update to work, but I need to raise the exception so the C++
On Thu, Oct 2, 2008 at 8:44 PM, Alvaro Herrera
[EMAIL PROTECTED] wrote:
Rob Richardson wrote:
Here's what I need to do:
IF query_check_fails THEN
UPDATE some_table SET some_value = 0 WHERE some_condition_is_true;
RAISE EXCEPTION 'Look, you idiot, do it right next time!';
END;
I
On Fri, Oct 3, 2008 at 7:41 AM, Jaime Casanova [EMAIL PROTECTED]
wrote:
On Thu, Oct 2, 2008 at 8:44 PM, Alvaro Herrera
[EMAIL PROTECTED] wrote:
Rob Richardson wrote:
Here's what I need to do:
IF query_check_fails THEN
UPDATE some_table SET some_value = 0 WHERE
On Fri, Oct 3, 2008 at 7:14 AM, Alvaro Herrera
[EMAIL PROTECTED]wrote:
Rob Richardson wrote:
Here's what I need to do:
IF query_check_fails THEN
UPDATE some_table SET some_value = 0 WHERE some_condition_is_true;
RAISE EXCEPTION 'Look, you idiot, do it right next time!';
END;
Gurjeet Singh wrote:
On Fri, Oct 3, 2008 at 7:14 AM, Alvaro Herrera
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
Rob Richardson wrote:
Here's what I need to do:
IF query_check_fails THEN
UPDATE some_table SET some_value = 0 WHERE
17 matches
Mail list logo