Content-Length: 268909 | pFad | http://github.com/postgrespro/postgres/commit/9e84cccff28e52ab76aa3d3e88bd815dc36d24d8

A3 Add doc example of restricting large object trigger firing to only · postgrespro/postgres@9e84ccc · GitHub
Skip to content

Commit 9e84ccc

Browse files
committed
Add doc example of restricting large object trigger firing to only
updates of the column of interest.
1 parent e45ae40 commit 9e84ccc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

doc/src/sgml/lo.sgml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,15 @@ CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image
7676
<para>
7777
For each column that will contain unique references to large objects,
7878
create a <literal>BEFORE UPDATE OR DELETE</> trigger, and give the column
79-
name as the sole trigger argument. If you need multiple <type>lo</>
79+
name as the sole trigger argument. You can also restrict the trigger
80+
to only execute on updates to the column with:
81+
82+
<programlisting>
83+
CREATE TRIGGER t_raster BEFORE UPDATE OF raster OR DELETE ON image
84+
FOR EACH ROW EXECUTE PROCEDURE lo_manage(raster);
85+
</programlisting>
86+
87+
If you need multiple <type>lo</>
8088
columns in the same table, create a separate trigger for each one,
8189
remembering to give a different name to each trigger on the same table.
8290
</para>

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/9e84cccff28e52ab76aa3d3e88bd815dc36d24d8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy