asset.copy_note
|
Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: |
Columns
| Column | Type | Nullable | Default | Notes |
|---|---|---|---|---|
id PK |
|
No |
nextval('asset.copy_note_id_seq'::regclass) |
|
owning_copy |
|
No |
||
creator FK |
|
No |
||
create_date |
|
Yes |
now() |
|
pub |
|
No |
false |
|
title |
|
No |
||
value |
|
No |
Foreign Keys
| Column(s) | References | On Delete | On Update | Deferrable | Constraint |
|---|---|---|---|---|---|
|
SET NULL |
NO ACTION |
DEFERRED |
|
Indexes
| Index | Method | Definition |
|---|---|---|
|
btree |
|
|
btree |
|
|
btree |
|
Triggers
| Trigger | Timing | Event | Level | Function |
|---|---|---|---|---|
|
AFTER |
INSERT OR UPDATE |
ROW |
Trigger Bodies
inherit_asset_copy_note_copy_fkey
Function: evergreen.asset_copy_note_owning_copy_inh_fkey()
Timing: AFTER INSERT OR UPDATE ROW
BEGIN
PERFORM 1 FROM asset.copy WHERE id = NEW.owning_copy;
IF NOT FOUND THEN
RAISE foreign_key_violation USING MESSAGE = FORMAT(
$$Referenced asset.copy id not found, owning_copy:%s$$, NEW.owning_copy
);
END IF;
RETURN NEW;
END;