Re: Delete rules - Mailing list pgsql-sql

From Richard Broersma
Subject Re: Delete rules
Date
Msg-id AANLkTinXJct-P_W71TYk3X+iNm=d1PRreX-PYk+5UBdO@mail.gmail.com
Whole thread Raw
In response to Delete rules  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
List pgsql-sql
On Wed, Aug 4, 2010 at 1:25 PM, Little, Douglas <DOUGLAS.LITTLE@orbitz.com> wrote:
 

But I don’t know how to access the entire sql statement for interrogation.   Is there a way I can see what the statement is that’s executing and triggering the rule?


I've found complex and simple rules pretty hard to get correct.  They sometimes do unexpected things.

It looks like the CREATE Trigger  FOR EACH STATEMENT is better suited to do what you want:

"In addition, triggers may be defined to fire for a TRUNCATE, though only FOR EACH STATEMENT."

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-sql by date:

Previous
From: Richard Broersma
Date:
Subject: Re: Domains, casts, and MS Access
Next
From: Peter Koczan
Date:
Subject: Re: Domains, casts, and MS Access