Optional REFERENCES Feature in CREATE TRIGGER Command

From: hyip(at)site(dot)uottawa(dot)ca
To: pgsql-patches(at)postgresql(dot)org
Subject: Optional REFERENCES Feature in CREATE TRIGGER Command
Date: 2004-12-07 20:56:35
Message-ID: 1413.127.0.0.1.1102452995.squirrel@127.0.0.1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi,

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)

The patch will also update two columns, condition_reference_old_table and
condition_reference_new_table with alias names of the OLD/NEW record in
the Triggers table of the information schema.

Attachment Content-Type Size
trigger.patch text/plain 18.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Frank van Vugt 2004-12-07 20:58:23 Re: RC1, missing -lpthread when building with --disable-shared on i686
Previous Message Zeugswetter Andreas DAZ SD 2004-12-07 16:30:18 Re: V8 Beta 5 on AIX