action.hold_copy_map

Data-Modifying Triggers: This table has BEFORE ROW trigger(s) that modify row data before write. Values you INSERT or UPDATE may differ from what is actually stored. See the Triggers section below.

Cascading Deletes: Deleting rows from this table will cascade to: action.hold_request.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: hold_copy_map_hold_fkey.

Columns

Column Type Nullable Default Notes

id PK

bigint

No

nextval('action.hold_copy_map_id_seq'::regclass)

hold FK

integer

No

action.hold_request(id)

target_copy

bigint

No

proximity

numeric

Yes

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

hold

action.hold_request(id)

CASCADE

NO ACTION

DEFERRED

hold_copy_map_hold_fkey

Unique Constraints

  • copy_once_per_hold: (hold, target_copy)

Indexes

Index Method Definition

hold_copy_map_pkey PK

btree

CREATE UNIQUE INDEX hold_copy_map_pkey ON action.hold_copy_map USING btree (id)

copy_once_per_hold UNIQUE

btree

CREATE UNIQUE INDEX copy_once_per_hold ON action.hold_copy_map USING btree (hold, target_copy)

acm_copy_idx

btree

CREATE INDEX acm_copy_idx ON action.hold_copy_map USING btree (target_copy)

Triggers

Trigger Timing Event Level Function

hold_copy_proximity_update_tgr

BEFORE

INSERT OR UPDATE

ROW

action.hold_copy_calculated_proximity_update()

Trigger Bodies

hold_copy_proximity_update_tgr

Function: action.hold_copy_calculated_proximity_update()
Timing: BEFORE INSERT OR UPDATE ROW

This trigger modifies the row before it is written (returns a modified NEW).

BEGIN
    NEW.proximity := action.hold_copy_calculated_proximity(NEW.hold,NEW.target_copy);
    RETURN NEW;
END;