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