Re: TODO item: support triggers on columns - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: TODO item: support triggers on columns
Date
Msg-id 200503111718.j2BHIYJ11643@candle.pha.pa.us
Whole thread Raw
In response to Re: TODO item: support triggers on columns  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: TODO item: support triggers on columns
List pgsql-hackers
Alvaro Herrera wrote:
> On Fri, Mar 11, 2005 at 11:32:04AM -0500, Bruce Momjian wrote:
> > Chris Mair wrote:
> > > Hello,
> > > 
> > > I'd like to start working on the following TODO item:
> > > Referential Integrity / Support triggers on columns
> > > 
> > > Is somebody else already working on this?
> > 
> > No one, I think.
> 
> Isn't this the REFERENCING clause?  I think there was a partial patch
> submitted already for this.

The patch appears unrelated to column-level triggers:
http://momjian.postgresql.org/cgi-bin/pgpatches2

---------------------------------------------------------------------------

The attached patch adds the optional REFERENCES syntax in CREATE TRIGGER
statement to make an automatic alias for OLD/NEW record during trigger
setup.  The implementation of this new feature makes CREATE TRIGGER
command more compatible to SQL standard, and allows the future
implementation of executing SQL commands in trigger action.

After the implementation, the extended syntax of statement is as
follows.

CREATE TRIGGER name BEFORE|AFTER   INSERT|DELETE|UPDATE [OR...] ON tablename   [REFERENCING OLD|NEW [AS] identifier]
[FOR[EACH] ROW|STATEMENT]   EXECUTE PROCEDURE funcname (arguments)
 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] snprintf causes regression
Next
From: Chris Mair
Date:
Subject: Re: TODO item: support triggers on columns