money.grocery
|
Trigger Side Effects: Writing to this table automatically triggers writes to other tables:
|
Columns
| Column | Type | Nullable | Default | Notes |
|---|---|---|---|---|
id PK |
|
No |
nextval('money.billable_xact_id_seq'::regclass) |
|
usr |
|
No |
||
xact_start |
|
No |
now() |
|
xact_finish |
|
Yes |
||
unrecovered |
|
Yes |
||
billing_location |
|
No |
||
note |
|
Yes |
Indexes
| Index | Method | Definition |
|---|---|---|
|
btree |
|
|
btree |
|
|
btree |
|
Triggers
| Trigger | Timing | Event | Level | Function |
|---|---|---|---|---|
|
AFTER |
UPDATE |
ROW |
|
|
AFTER |
INSERT |
ROW |
|
|
AFTER |
DELETE |
ROW |
Trigger Bodies
mat_summary_change_tgr
Function: money.mat_summary_update()
Timing: AFTER UPDATE ROW
BEGIN
UPDATE money.materialized_billable_xact_summary
SET usr = NEW.usr,
xact_start = NEW.xact_start,
xact_finish = NEW.xact_finish
WHERE id = NEW.id;
RETURN NEW;
END;
mat_summary_create_tgr
Function: money.mat_summary_create()
Timing: AFTER INSERT ROW
BEGIN
INSERT INTO money.materialized_billable_xact_summary (id, usr, xact_start, xact_finish, total_paid, total_owed, balance_owed, xact_type)
VALUES ( NEW.id, NEW.usr, NEW.xact_start, NEW.xact_finish, 0.0, 0.0, 0.0, TG_ARGV[0]);
RETURN NEW;
END;
mat_summary_remove_tgr
Function: money.mat_summary_delete()
Timing: AFTER DELETE ROW
BEGIN
DELETE FROM money.materialized_billable_xact_summary WHERE id = OLD.id;
RETURN OLD;
END;