Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f503b6a8
Commit
f503b6a8
authored
Mar 04, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better document INSTEAD behavior for rules.
parent
f3c6d592
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
doc/src/sgml/ref/create_rule.sgml
doc/src/sgml/ref/create_rule.sgml
+21
-10
No files found.
doc/src/sgml/ref/create_rule.sgml
View file @
f503b6a8
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.4
2 2003/11/29 19:51:38 pgsql
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.4
3 2004/03/04 14:32:12 momjian
Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -42,15 +42,15 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
...
@@ -42,15 +42,15 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
define an alternate action to be performed on insertions, updates,
define an alternate action to be performed on insertions, updates,
or deletions in database tables. Roughly speaking, a rule causes
or deletions in database tables. Roughly speaking, a rule causes
additional commands to be executed when a given command on a given
additional commands to be executed when a given command on a given
table is executed. Alternatively, a
rule can replace a given
table is executed. Alternatively, a
n <literal>INSTEAD</literal>
command by another, or cause a command not to be executed at all.
rule can replace a given command by another, or cause a command
Rules are used to implement table views as well. It is important
not to be executed at all. Rules are used to implement table
to realize that a rule is really a command transformation
views as well. It is important to realize that a rule is really
mechanism, or command macro. The transformation happens before the
a command transformation mechanism, or command macro. The
execution of the commands starts. If you actually want an
transformation happens before the execution of the commands starts.
operation that fires independently for each physical row, you
If you actually want an operation that fires independently for each
p
robably want to use a trigger, not a rule. More information about
p
hysical row, you probably want to use a trigger, not a rule.
the rules system is in <xref linkend="rules">.
More information about
the rules system is in <xref linkend="rules">.
</para>
</para>
<para>
<para>
...
@@ -140,6 +140,17 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
...
@@ -140,6 +140,17 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
</listitem>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<term><option>INSTEAD</option></term>
<listitem>
<para>
<literal>INSTEAD</literal> indicates that the commands should be
executed <emphasis>instead</> of the original command, not in
addition to the original command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<varlistentry>
<term><replaceable class="parameter">command</replaceable></term>
<term><replaceable class="parameter">command</replaceable></term>
<listitem>
<listitem>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment