Re: Optional REFERENCES Feature in CREATE TRIGGER Command - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Optional REFERENCES Feature in CREATE TRIGGER Command
Date
Msg-id 200412130249.iBD2nqv02443@candle.pha.pa.us
Whole thread Raw
In response to Optional REFERENCES Feature in CREATE TRIGGER Command  (hyip@site.uottawa.ca)
Responses Re: Optional REFERENCES Feature in CREATE TRIGGER Command  (hyip@site.uottawa.ca)
List pgsql-patches
This has been saved for the 8.1 release:

    http:/momjian.postgresql.org/cgi-bin/pgpatches2

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

hyip@site.uottawa.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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: hyip@site.uottawa.ca
Date:
Subject: Optional REFERENCES Feature in CREATE TRIGGER Command
Next
From: Tom Lane
Date:
Subject: Re: Optional REFERENCES Feature in CREATE TRIGGER Command