To use this to prevent simultaneous inserts of the same data (for example if two employees try to insert the same contact into the DB), I suppose you could use a constraint (before insert) that checks that there is no data matching the md5 checksum, right?


CREATE TABLE blah
(
        mymd5   TEXT NOT NULL,
        UNIQUE( mymd5 )
);

will do this for you automatically and create an index to enforce it (don'tcreate another index !)


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply via email to