Re: Foreign Key Constraint Deletion Order

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: <cnliou(at)eurosport(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Foreign Key Constraint Deletion Order
Date: 2001-11-19 09:26:08
Message-ID: 20011119011353.M43437-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 19 Nov 2001 cnliou(at)eurosport(dot)com wrote:

> Then I am in big big trouble! Please imagine a very
> usual scenario:
> [example snipped]

I think you can do this as part of a trigger on PurchaseMaster and
something that doesn't do the subtraction if the subselect returns
a NULL in the detail trigger (or subtracts 0), not as pretty, but
it should function. The master trigger would subtract as necessary
for the details for the user.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Gurudutt 2001-11-19 10:42:25 PqReadData()
Previous Message dino ck 2001-11-19 09:22:58 How to return more than one row of data from a function in PL/pgSQL