= Trigger Functions = == Description == This section documents the PostgreSQL PL/pgSQL trigger functions implemented for automatic validation and conflict prevention. The triggers are executed automatically during INSERT and UPDATE operations. == 1. Venue Booking Conflict Prevention == === Description === This trigger prevents overlapping venue bookings for the same venue and time interval. === SQL Code === {{collapse(View SQL Code) PASTE SQL FROM advanced_triggers.sql }} == 2. Photographer Booking Conflict Prevention == === Description === This trigger prevents overlapping photographer bookings. == 3. Band Booking Conflict Prevention == === Description === This trigger prevents overlapping band reservations. == 4. Attendance Consistency Validation == === Description === This trigger validates attendance records against RSVP responses.