Re: TODO item: support triggers on columns

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Chris Mair <list(at)1006(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO item: support triggers on columns
Date: 2005-03-11 17:18:34
Message-ID: 200503111718.j2BHIYJ11643@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Mair 2005-03-11 17:19:18 Re: TODO item: support triggers on columns
Previous Message Bruce Momjian 2005-03-11 17:14:26 Re: [pgsql-hackers-win32] snprintf causes regression