Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ac3797a

Browse files
committed
Remove tabs from SGML file.
1 parent 31b15fe commit ac3797a

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

doc/src/sgml/func.sgml

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.453 2008/11/03 20:17:20 adunstan Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.454 2008/11/04 00:59:45 momjian Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -12855,46 +12855,46 @@ SELECT (pg_stat_file('filename')).modification;
1285512855

1285612856
<para>
1285712857
Currently <productname>PostgreSQL</> provides one built in trigger
12858-
function, <function>suppress_redundant_updates_trigger</>,
12859-
which will prevent any update
12860-
that does not actually change the data in the row from taking place, in
12861-
contrast to the normal behaviour which always performs the update
12862-
regardless of whether or not the data has changed. (This normal behaviour
12863-
makes updates run faster, since no checking is required, and is also
12864-
useful in certain cases.)
12858+
function, <function>suppress_redundant_updates_trigger</>,
12859+
which will prevent any update
12860+
that does not actually change the data in the row from taking place, in
12861+
contrast to the normal behaviour which always performs the update
12862+
regardless of whether or not the data has changed. (This normal behaviour
12863+
makes updates run faster, since no checking is required, and is also
12864+
useful in certain cases.)
1286512865
</para>
1286612866

12867-
<para>
12868-
Ideally, you should normally avoid running updates that don't actually
12869-
change the data in the record. Redundant updates can cost considerable
12870-
unnecessary time, especially if there are lots of indexes to alter,
12871-
and space in dead rows that will eventually have to be vacuumed.
12872-
However, detecting such situations in client code is not
12873-
always easy, or even possible, and writing expressions to detect
12874-
them can be error-prone. An alternative is to use
12875-
<function>suppress_redundant_updates_trigger</>, which will skip
12876-
updates that don't change the data. You should use this with care,
12877-
however. The trigger takes a small but non-trivial time for each record,
12878-
so if most of the records affected by an update are actually changed,
12879-
use of this trigger will actually make the update run slower.
12867+
<para>
12868+
Ideally, you should normally avoid running updates that don't actually
12869+
change the data in the record. Redundant updates can cost considerable
12870+
unnecessary time, especially if there are lots of indexes to alter,
12871+
and space in dead rows that will eventually have to be vacuumed.
12872+
However, detecting such situations in client code is not
12873+
always easy, or even possible, and writing expressions to detect
12874+
them can be error-prone. An alternative is to use
12875+
<function>suppress_redundant_updates_trigger</>, which will skip
12876+
updates that don't change the data. You should use this with care,
12877+
however. The trigger takes a small but non-trivial time for each record,
12878+
so if most of the records affected by an update are actually changed,
12879+
use of this trigger will actually make the update run slower.
1288012880
</para>
1288112881

1288212882
<para>
1288312883
The <function>suppress_redundant_updates_trigger</> function can be
12884-
added to a table like this:
12884+
added to a table like this:
1288512885
<programlisting>
1288612886
CREATE TRIGGER z_min_update
1288712887
BEFORE UPDATE ON tablename
1288812888
FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
1288912889
</programlisting>
1289012890
In most cases, you would want to fire this trigger last for each row.
12891-
Bearing in mind that triggers fire in name order, you would then
12892-
choose a trigger name that comes after the name of any other trigger
12891+
Bearing in mind that triggers fire in name order, you would then
12892+
choose a trigger name that comes after the name of any other trigger
1289312893
you might have on the table.
1289412894
</para>
12895-
<para>
12895+
<para>
1289612896
For more information about creating triggers, see
12897-
<xref linkend="SQL-CREATETRIGGER">.
12897+
<xref linkend="SQL-CREATETRIGGER">.
1289812898
</para>
1289912899
</sect1>
1290012900
</chapter>

0 commit comments

Comments
 (0)