From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: "ALSO" keyword to "CREATE RULE" patch |
Date: | 2004-03-03 19:03:15 |
Message-ID: | 200403031903.i23J3Fx14760@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-patches |
Is ALSO part of the SQL standard? I can't imagine it is because there
is no rule mention.
I guess if were were coding from scratch, we could make the syntax
INSTEAD or ALSO, but at this point, I don't see adding ALSO as a useful
change.
---------------------------------------------------------------------------
Fabien COELHO wrote:
>
> Dear patchers,
>
> Please find attached a small patch to add an optionnal "ALSO" keyword
> to the "CREATE RULE" syntax.
>
> The "ALSO" keyword can be used where "INSTEAD" would be used,
> to mean the opposite, i.e. the current default behavior of rules
> which adds operations to the current one. IMHO, it makes the
> intended behavior much clearer for the basic user (say, me;-).
>
> CREATE RULE some_table_del AS
> ON DELETE TO some_table DO ALSO
> (
> DELETE FROM this_other_table WHERE id=old.id;
> );
>
> Of course, the absence of the "ALSO" keyword preserves the previous
> behavior... that is it behaves the same as with the "ALSO" keyword.
>
> This patch was made against 7.4.1 with the "difforig" script
> provided by postgresql.
>
> It adds "ALSO" keyword in the parser code (two lines), fixes somehow the
> documentation and sql help, and modifies four of the "RULE"
> test cases to use this keyword instead of the default nothing-ness.
>
> It validated for me with a "make check".
>
> Have a nice day,
>
> --
> Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr
Content-Description:
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | L J Bayuk | 2004-03-04 02:30:53 | Re: Request temporary freeze of libpgtcl chapter in manual |
Previous Message | Fabien COELHO | 2004-03-01 08:10:54 | "ALSO" keyword to "CREATE RULE" patch |
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2004-03-03 22:25:15 | minor doc improvements |
Previous Message | Bruce Momjian | 2004-03-03 17:43:04 | Re: log_line_info |