pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Russell Simpkins <russellsimpkins@hotmail.com>
To: tgl@sss.pgh.pa.us
Cc: pgsql-sql@postgresql.org
Subject: Re: after delete trigger behavior
Date: Wed, 22 Jun 2005 15:27:31 -0400
Message-ID: <BAY103-F32AC833BD206511D502126B5EB0@phx.gbl> (raw)
In-Reply-To: <20364.1119467550@sss.pgh.pa.us>


>I suspect that if you read the spec carefully it would want a "triggered
>data change violation" error raised here.  My advice is not to use a
>BEFORE trigger for this.

What would you recommend then. I am using Hibernate in my java application 
and if the sort_order column (in this example column.c) gets out of sync, 
then the Hibernate application fails. In hind site, the after delete trigger 
would be the better choice.

The trigger works fine for one row deletes, but I noticed that you can't 
even do multiple row deletes with the trigger. Postgres only executes one 
row delete.





view thread (8+ messages)  latest in thread

Message-ID: <BAY103-F32AC833BD206511D502126B5EB0@phx.gbl>
Permalink:  ../BAY103-F32AC833BD206511D502126B5EB0@phx.gbl/
Also on:    postgresql.org/message-id/BAY103-F32AC833BD206511D502126B5EB0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: russellsimpkins@hotmail.com, tgl@sss.pgh.pa.us
  Subject: Re: after delete trigger behavior
  In-Reply-To: <BAY103-F32AC833BD206511D502126B5EB0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox