acq.fund_debit
|
Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: |
|
Trigger Side Effects: Writing to this table automatically triggers writes to other tables:
|
Columns
| Column | Type | Nullable | Default | Notes |
|---|---|---|---|---|
id PK |
|
No |
nextval('acq.fund_debit_id_seq'::regclass) |
|
fund FK |
|
No |
||
origin_amount |
|
No |
||
origin_currency_type FK |
|
No |
||
amount |
|
No |
||
encumbrance |
|
No |
true |
|
debit_type |
|
No |
||
xfer_destination FK |
|
Yes |
||
create_time |
|
No |
now() |
|
invoice_entry FK |
|
Yes |
Foreign Keys
| Column(s) | References | On Delete | On Update | Deferrable | Constraint |
|---|---|---|---|---|---|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
|
|
SET NULL |
NO ACTION |
No |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
|
|
NO ACTION |
NO ACTION |
DEFERRED |
|
Indexes
| Index | Method | Definition |
|---|---|---|
|
btree |
|
|
btree |
|
Triggers
| Trigger | Timing | Event | Level | Function |
|---|---|---|---|---|
|
AFTER |
DELETE OR UPDATE |
ROW |
Trigger Bodies
audit_acq_fund_debit_update_trigger
Function: auditor.audit_acq_fund_debit_func()
Timing: AFTER DELETE OR UPDATE ROW
BEGIN
INSERT INTO auditor.acq_fund_debit_history ( audit_id, audit_time, audit_action, audit_user, audit_ws, id, fund, origin_amount, origin_currency_type, amount, encumbrance, debit_type, xfer_destination, create_time, invoice_entry )
SELECT nextval('auditor.acq_fund_debit_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
eg_user,
eg_ws,
OLD.id, OLD.fund, OLD.origin_amount, OLD.origin_currency_type, OLD.amount, OLD.encumbrance, OLD.debit_type, OLD.xfer_destination, OLD.create_time, OLD.invoice_entry
FROM auditor.get_audit_info();
RETURN NULL;
END;
Referenced By
The following tables have foreign keys pointing to acq.fund_debit (4 referencing table(s)):
| Table | Referencing Column(s) | Referenced Column(s) | Constraint |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|