Rule/SELECT

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Rule/SELECT
Date: 2001-01-20 03:45:27
Message-ID: 200101200345.WAA27858@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I see now that this has been applied. Thanks for pointing it out.

RuleActionStmt: SelectStmt
| InsertStmt
| UpdateStmt
| DeleteStmt
| NotifyStmt
;

> I suggest that the CREATE RULE syntax be relaxed so that
> it is legal to have a list of SELECT commands in a rule.
>
> I'll argue that:
> 1) The change is simple (2 lines in gram.y). Diff is
> attached.
> 2) It breaks nothing (more things become legal)
> 3) It makes the parser agree with the published syntax,
> which currently makes no distinction about SELECT
> commands.
> 4) It makes the language more "regular" in that SELECT
> commands are no longer special.:
>
> Diff is an attachment because of line-wrapping. I'm new
> here
> so I don't know if this works. But as I said it's only 2
> lines.
>
> ++ kevin
>
>
>
> ---
> Kevin O'Gorman (805) 650-6274 mailto:kogorman(at)pacbell(dot)net
> Permanent e-mail forwarder:
> mailto:Kevin.O'Gorman(dot)64(at)Alum(dot)Dartmouth(dot)org
> At school: mailto:kogorman(at)cs(dot)ucsb(dot)edu
> Web: http://www.cs.ucsb.edu/~kogorman/index.html
> Web: http://trixie.kosman.via.ayuda.com/~kevin/index.html
>
> "There is a freedom lying beyond circumstance,
> derived from the direct intuition that life can
> be grounded upon its absorption in what is
> changeless amid change"
> -- Alfred North Whitehead

> --- gram.y.orig Thu May 25 15:42:17 2000
> +++ gram.y Thu Oct 19 14:34:47 2000
> @@ -2585,7 +2585,6 @@
> ;
>
> RuleActionList: NOTHING { $$ = NIL; }
> - | SelectStmt { $$ = lcons($1, NIL); }
> | RuleActionStmt { $$ = lcons($1, NIL); }
> | '[' RuleActionMulti ']' { $$ = $2; }
> | '(' RuleActionMulti ')' { $$ = $2; }
> @@ -2607,6 +2606,7 @@
> ;
>
> RuleActionStmt: InsertStmt
> + | SelectStmt
> | UpdateStmt
> | DeleteStmt
> | NotifyStmt

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-01-20 04:09:32 Re: length coerce for bpchar is broken since 7.0
Previous Message Tom Lane 2001-01-20 03:45:22 Re: length coerce for bpchar is broken since 7.0