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

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? -- solved
Date: 2008-10-03 16:40:32
Message-ID: 04A6DB42D2BA534FAC77B90562A6A03DA95F06@server.rad-con.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 database). A Python script running under the control of a service
checks every minute for dangling coils and removes their charge numbers.
This is not ideal, but it works. It has the added benefit of handling
dangling coils that have shown up from another (as yet unidentified)
cause occasionally.

RobR

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph S 2008-10-03 18:48:56 Static functions
Previous Message Artacus 2008-10-03 16:21:59 Re: Getting rows in statement-level triggers