mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Add more limited large object trigger example.
This commit is contained in:
parent
9e84cccff2
commit
864de654c8
@ -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,
|
For each column that will contain unique references to large objects,
|
||||||
create a <literal>BEFORE UPDATE OR DELETE</> trigger, and give the column
|
create a <literal>BEFORE UPDATE OR DELETE</> trigger, and give the column
|
||||||
name as the sole trigger argument. You can also restrict the trigger
|
name as the sole trigger argument. You can also restrict the trigger
|
||||||
to only execute on updates to the column with:
|
to only execute on updates to the column by using <literal>BEFORE UPDATE
|
||||||
|
OF</literal> <replaceable class="parameter">column_name</replaceable>.
|
||||||
<programlisting>
|
|
||||||
CREATE TRIGGER t_raster BEFORE UPDATE OF raster OR DELETE ON image
|
|
||||||
FOR EACH ROW EXECUTE PROCEDURE lo_manage(raster);
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
If you need multiple <type>lo</>
|
If you need multiple <type>lo</>
|
||||||
columns in the same table, create a separate trigger for each one,
|
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.
|
remembering to give a different name to each trigger on the same table.
|
||||||
|
Loading…
Reference in New Issue
Block a user