Re: AFTER triggers and constraints

From: Vick Khera <vivek(at)khera(dot)org>
To: David Greco <David_Greco(at)harte-hanks(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: AFTER triggers and constraints
Date: 2013-06-28 13:34:55
Message-ID: CALd+dccFb0EkVUfKxcqwn1fTk6uaWHrdnC3pDi1AeEVfQh_CLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 28, 2013 at 8:45 AM, David Greco <David_Greco(at)harte-hanks(dot)com>wrote:

> The last delete statement will throw a referential integrity error. In
> Oracle, same example, it does not as the trigger deletes the child.****
>
>
Not sure your real case, but why not just make the FK on delete cascade and
get rid of your trigger entirely?

Alternatively, what if you make your constratint initially deferred?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Greco 2013-06-28 13:37:45 Re: AFTER triggers and constraints
Previous Message Christoph Berg 2013-06-28 13:09:37 Re: Why are there no inequality scans for ctid?