action.transit_copy
|
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.transit_copy_id_seq'::regclass) |
|
source_send_time |
|
Yes |
||
dest_recv_time |
|
Yes |
||
target_copy |
|
No |
||
source FK |
|
No |
||
dest FK |
|
No |
||
prev_hop FK |
|
Yes |
||
copy_status FK |
|
No |
||
persistant_transfer |
|
No |
false |
|
prev_dest FK |
|
Yes |
||
cancel_time |
|
Yes |
Foreign Keys
| Column(s) | References | On Delete | On Update | Deferrable | Constraint |
|---|---|---|---|---|---|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
Indexes
| Index | Method | Definition |
|---|---|---|
|
btree |
|
|
btree |
|
|
btree |
|
|
btree |
|
|
btree |
|
Triggers
| Trigger | Timing | Event | Level | Function |
|---|---|---|---|---|
|
AFTER |
INSERT |
ROW |
Trigger Bodies
transit_copy_is_unique_check
Function: action.copy_transit_is_unique()
Timing: AFTER INSERT ROW
BEGIN
PERFORM * FROM action.transit_copy
WHERE target_copy = NEW.target_copy
AND dest_recv_time IS NULL
AND cancel_time IS NULL;
IF FOUND THEN
RAISE EXCEPTION 'Copy id=% is already in transit', NEW.target_copy;
END IF;
RETURN NULL;
END;