-- Update rules
CREATE OR REPLACE RULE anime_update_notify_rule AS
- ON UPDATE TO anime DO SELECT pg_notify('anime_update', new.aid::text);
+ ON UPDATE TO anime DO SELECT pg_notify('rename_data_changed', ''),
+ pg_notify('anime_update', new.aid::text);
CREATE OR REPLACE RULE episode_update_notify_rule AS
- ON UPDATE TO episode DO SELECT pg_notify('episode_update', new.eid::text || ',' || new.aid::text);
+ ON UPDATE TO episode DO SELECT pg_notify('rename_data_changed', ''),
+ pg_notify('episode_update', new.eid::text || ',' || new.aid::text);
CREATE OR REPLACE RULE file_update_notify_rule AS
- ON UPDATE TO file DO SELECT pg_notify('file_update', new.fid::text || ',' || new.eid::text || ',' || new.aid::text);
+ ON UPDATE TO file DO SELECT pg_notify('rename_data_changed', ''),
+ pg_notify('file_update', new.fid::text || ',' || new.eid::text || ',' || new.aid::text);
CREATE OR REPLACE RULE file_location_update_notify_rule AS
- ON UPDATE TO file_location DO SELECT pg_notify('file_location_update', new.location_id::text || ',' || new.fid::text);
+ ON UPDATE TO file_location DO SELECT pg_notify('rename_data_changed', ''),
+ pg_notify('file_location_update', new.location_id::text || ',' || new.fid::text);
+-- Delete rules
CREATE OR REPLACE RULE file_location_delete_notify_rule AS
ON DELETE TO file_location DO SELECT pg_notify('file_location_delete', old.location_id::text || ',' || old.fid::text);