Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ScheduleId::uuid | Start::timestamptz(now()) | SlotSize::int(minutes) | Interval::int(days)
- SlotId::uuid | ScheduleId::uuid | Start::timestamptz | End::timestamptz
- create
- trigger create_slots after insert
- on
- schedule for each row execute procedure create_new_slots();
- create
- or replace function create_new_slots() returns trigger language plpgsql as $function$ begin insert
- into
- slot select
- uuid_generate_v4(),
- new."ScheduleId",
- start?????,
- end?????,
- end,
- false,
- null
- end return new;
- end $function$
Add Comment
Please, Sign In to add comment