Renamed the trigger.c to dupetrigger.c to enlarge the namespace for
[mir.git] / dbscripts / dupetrigger / postgresql.sript
1 \connect - postgres
2 DROP FUNCTION dupecheck();
3 DROP TRIGGER dupetrigger ON comment;
4 CREATE FUNCTION dupecheck() RETURNS OPAQUE AS '/path/to/dupetrigger.so' LANGUAGE 'C';
5 CREATE TRIGGER dupetrigger BEFORE INSERT OR UPDATE ON comment FOR EACH ROW EXECUTE PROCEDURE dupecheck();
6 CREATE INDEX comment_checksum_index on comment (checksum);