Skip to content
Snippets Groups Projects
Commit 864de654 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Add more limited large object trigger example.

parent 9e84cccf
No related branches found
No related tags found
No related merge requests found
......@@ -77,13 +77,8 @@ CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image
For each column that will contain unique references to large objects,
create a <literal>BEFORE UPDATE OR DELETE</> trigger, and give the column
name as the sole trigger argument. You can also restrict the trigger
to only execute on updates to the column with:
<programlisting>
CREATE TRIGGER t_raster BEFORE UPDATE OF raster OR DELETE ON image
FOR EACH ROW EXECUTE PROCEDURE lo_manage(raster);
</programlisting>
to only execute on updates to the column by using <literal>BEFORE UPDATE
OF</literal> <replaceable class="parameter">column_name</replaceable>.
If you need multiple <type>lo</>
columns in the same table, create a separate trigger for each one,
remembering to give a different name to each trigger on the same table.
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment