|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.41 2005/01/29 23:45:36 tgl Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.42 2005/05/20 01:37:08 neilc Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="rules">
|
4 | 4 | <title>The Rule System</title>
|
@@ -902,9 +902,9 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
|
902 | 902 | Keep the syntax
|
903 | 903 |
|
904 | 904 | <programlisting>
|
905 |
| -CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</> |
906 |
| - TO <replaceable>object</> [WHERE <replaceable>rule_qualification</>] |
907 |
| - DO [ALSO|INSTEAD] [<replaceable>action</> | (<replaceable>actions</>) | NOTHING]; |
| 905 | +CREATE[ OR REPLACE ]RULE <replaceable class="parameter">name</replaceable> AS ON <replaceable class="parameter">event</replaceable> |
| 906 | + TO <replaceable class="parameter">table</replaceable> [WHERE <replaceable class="parameter">condition</replaceable>] |
| 907 | + DO [ALSO |INSTEAD ] { NOTHING |<replaceable class="parameter">command</replaceable> | (<replaceable class="parameter">command</replaceable> ; <replaceable class="parameter">command</replaceable> ... ) } |
908 | 908 | </programlisting>
|
909 | 909 |
|
910 | 910 | in mind.
|
|