action.usr_circ_history
|
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('action.usr_circ_history_id_seq'::regclass) |
|
usr FK |
|
No |
||
xact_start |
|
No |
now() |
|
target_copy |
|
No |
||
due_date |
|
No |
||
checkin_time |
|
Yes |
||
source_circ FK |
|
Yes |
Foreign Keys
| Column(s) | References | On Delete | On Update | Deferrable | Constraint |
|---|---|---|---|---|---|
|
SET NULL |
NO ACTION |
DEFERRED |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
Indexes
| Index | Method | Definition |
|---|---|---|
|
btree |
|
|
btree |
|
|
btree |
|
Triggers
| Trigger | Timing | Event | Level | Function |
|---|---|---|---|---|
|
AFTER |
INSERT OR UPDATE |
ROW |
Trigger Bodies
action_usr_circ_history_target_copy_trig
Function: evergreen.fake_fkey_tgr()
Timing: AFTER INSERT OR UPDATE ROW
DECLARE
copy_id BIGINT;
BEGIN
EXECUTE 'SELECT ($1).' || quote_ident(TG_ARGV[0]) INTO copy_id USING NEW;
IF copy_id IS NOT NULL THEN
PERFORM * FROM asset.copy WHERE id = copy_id;
IF NOT FOUND THEN
RAISE EXCEPTION 'Key (%.%=%) does not exist in asset.copy', TG_TABLE_SCHEMA, TG_TABLE_NAME, copy_id;
END IF;
END IF;
RETURN NULL;
END;