Thread: create rule syntax

create rule syntax

From
Kris Jurka
Date:
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

Attachment

Re: create rule syntax

From
Neil Conway
Date:
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

Re: create rule syntax

From
Robert Treat
Date:
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

Re: create rule syntax

From
Neil Conway
Date:
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