Re: Optional REFERENCES Feature in CREATE TRIGGER Command

From: hyip(at)site(dot)uottawa(dot)ca
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Optional REFERENCES Feature in CREATE TRIGGER Command
Date: 2004-12-13 22:20:01
Message-ID: 3364.127.0.0.1.1102976401.squirrel@127.0.0.1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I really appreciate that, Mr. Momjian.

>
> This has been saved for the 8.1 release:
>
> http:/momjian.postgresql.org/cgi-bin/pgpatches2
>
> ---------------------------------------------------------------------------
>
> hyip(at)site(dot)uottawa(dot)ca wrote:
>> 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, skipping... ]
>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 9: the planner will ignore your desire to choose an index scan if
>> your
>> joining column's datatypes do not match
>
> --
> 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

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-12-13 22:20:39 Re: From latin9 to sql_ascii??
Previous Message hyip 2004-12-13 22:17:29 Re: Optional REFERENCES Feature in CREATE TRIGGER Command