Proposed relaxation of CREATE RULE syntax - Mailing list pgsql-hackers

From Kevin O'Gorman
Subject Proposed relaxation of CREATE RULE syntax
Date
Msg-id 39EF974E.7B852EF7@pacbell.net
Whole thread Raw
Responses Re: Proposed relaxation of CREATE RULE syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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,
whichcurrently 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@pacbell.net
Permanent e-mail forwarder: 
mailto:Kevin.O'Gorman.64@Alum.Dartmouth.org
At school: mailto:kogorman@cs.ucsb.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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rule system goes weird with SELECT queries
Next
From: Tom Lane
Date:
Subject: Re: Proposed relaxation of CREATE RULE syntax