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

From: Blazej <bl(dot)oleszkiewicz(at)gmail(dot)com>
To: "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I save data and then raise an exception?
Date: 2008-10-03 16:10:37
Message-ID: 819df3760810030910rfcb7c22g99b50d90355ec360@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Maybe try pltclu - you may use socket (TCP/IP) or to write data to OS
filesystem. I was doing in pltclu very similar things.

Write what you concrete watnts (in points), then I will try to write
you scripts.

Regards
Blazej

2008/10/3 Rob Richardson <Rob(dot)Richardson(at)rad-con(dot)com>:
> 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
> horrible case of DLL Hell. I told my bosses that if we change any C++
> code at that site, we have to change all of it. So I need a pure
> database solution. Or maybe something else. Now I'm thinking of a
> Python script, of which there are several running on site.
>
> RobR
>
>
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Friday, October 03, 2008 8:47 AM
> To: Rob Richardson
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] How do I save data and then raise an exception?
>
> "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com> 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 every minute and
>> checks all coils with status "Assigned" to make sure that the
>> associated charges actually exist. That would fix another recurring
>> problem, in which a user intentionally deletes a charge but the
>> charge's coils stay assigned to that charge.
>
> Why don't you have a foreign key constraint from coils to charges?
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Artacus 2008-10-03 16:21:59 Re: Getting rows in statement-level triggers
Previous Message Alvaro Herrera 2008-10-03 16:06:05 Re: Getting rows in statement-level triggers