public inbox for [email protected]
help / color / mirror / Atom feedcreate rule syntax
4+ messages / 3 participants
[nested] [flat]
* create rule syntax
@ 2005-05-11 19:23 Kris Jurka <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Kris Jurka @ 2005-05-11 19:23 UTC (permalink / raw)
To: pgsql-docs
The manual shows slightly different variations for the create rule
syntax here and here:
http://www.postgresql.org/docs/8.0/static/rules-update.html
http://www.postgresql.org/docs/8.0/static/sql-createrule.html
The attached patches makes the first look like the second. The key change
is that it shows how multiple actions are delimited:
(actions) vs. (command ; command ...)
Kris Jurka
Index: doc/src/sgml/rules.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/rules.sgml,v
retrieving revision 1.41
diff -c -r1.41 rules.sgml
*** doc/src/sgml/rules.sgml 29 Jan 2005 23:45:36 -0000 1.41
--- doc/src/sgml/rules.sgml 11 May 2005 19:19:59 -0000
***************
*** 902,910 ****
Keep the syntax
<programlisting>
! CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
! TO <replaceable>object</> [WHERE <replaceable>rule_qualification</>]
! DO [ALSO|INSTEAD] [<replaceable>action</> | (<replaceable>actions</>) | NOTHING];
</programlisting>
in mind.
--- 902,910 ----
Keep the syntax
<programlisting>
! CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS ON <replaceable class="parameter">event</replaceable>
! TO <replaceable class="parameter">table</replaceable> [ WHERE <replaceable class="parameter">condition</replaceable> ]
! DO [ ALSO | INSTEAD ] { NOTHING | <replaceable class="parameter">command</replaceable> | ( <replaceable class="parameter">command</replaceable> ; <replaceable class="parameter">command</replaceable> ... ) }
</programlisting>
in mind.
Attachments:
[text/plain] rule-syntax.patch (1.2K, 2-rule-syntax.patch)
download | inline diff:
Index: doc/src/sgml/rules.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/rules.sgml,v
retrieving revision 1.41
diff -c -r1.41 rules.sgml
*** doc/src/sgml/rules.sgml 29 Jan 2005 23:45:36 -0000 1.41
--- doc/src/sgml/rules.sgml 11 May 2005 19:19:59 -0000
***************
*** 902,910 ****
Keep the syntax
<programlisting>
! CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
! TO <replaceable>object</> [WHERE <replaceable>rule_qualification</>]
! DO [ALSO|INSTEAD] [<replaceable>action</> | (<replaceable>actions</>) | NOTHING];
</programlisting>
in mind.
--- 902,910 ----
Keep the syntax
<programlisting>
! CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS ON <replaceable class="parameter">event</replaceable>
! TO <replaceable class="parameter">table</replaceable> [ WHERE <replaceable class="parameter">condition</replaceable> ]
! DO [ ALSO | INSTEAD ] { NOTHING | <replaceable class="parameter">command</replaceable> | ( <replaceable class="parameter">command</replaceable> ; <replaceable class="parameter">command</replaceable> ... ) }
</programlisting>
in mind.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: create rule syntax
@ 2005-05-20 01:37 Neil Conway <[email protected]>
parent: Kris Jurka <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Neil Conway @ 2005-05-20 01:37 UTC (permalink / raw)
To: Kris Jurka <[email protected]>; +Cc: pgsql-docs
Kris Jurka wrote:
> The manual shows slightly different variations for the create rule
> syntax here and here:
>
> http://www.postgresql.org/docs/8.0/static/rules-update.html
> http://www.postgresql.org/docs/8.0/static/sql-createrule.html
>
> The attached patches makes the first look like the second.
Applied, thanks.
-Neil
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: create rule syntax
@ 2005-05-20 11:56 Robert Treat <[email protected]>
parent: Neil Conway <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Robert Treat @ 2005-05-20 11:56 UTC (permalink / raw)
To: Neil Conway <[email protected]>; +Cc: Kris Jurka <[email protected]>; pgsql-docs
On Thursday 19 May 2005 21:37, Neil Conway wrote:
> Kris Jurka wrote:
> > The manual shows slightly different variations for the create rule
> > syntax here and here:
> >
> > http://www.postgresql.org/docs/8.0/static/rules-update.html
> > http://www.postgresql.org/docs/8.0/static/sql-createrule.html
> >
> > The attached patches makes the first look like the second.
>
> Applied, thanks.
Sorry I missed this before, but the first examples use of create rule on
*object* rather than *table* seems like something important enough to keep,
since obviously rules can be on more than just tables.
--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: create rule syntax
@ 2005-05-20 12:31 Neil Conway <[email protected]>
parent: Robert Treat <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Neil Conway @ 2005-05-20 12:31 UTC (permalink / raw)
To: Robert Treat <[email protected]>; +Cc: Kris Jurka <[email protected]>; pgsql-docs
Robert Treat wrote:
> Sorry I missed this before, but the first examples use of create rule on
> *object* rather than *table* seems like something important enough to keep,
> since obviously rules can be on more than just tables.
I can't get too excited about this. CREATE RULE uses "table" as well,
and specifies that "table" really means "table or view". Similarly, the
INSERT syntax summary talks about "INSERT INTO table ...", although of
course you can insert into a view if the appropriate rule exists. A view
is a table in more ways than one...
-Neil
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-05-20 12:31 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-11 19:23 create rule syntax Kris Jurka <[email protected]>
2005-05-20 01:37 ` Neil Conway <[email protected]>
2005-05-20 11:56 ` Robert Treat <[email protected]>
2005-05-20 12:31 ` Neil Conway <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox