search for: insertsharing

Displaying 1 result from an estimated 1 matches for "insertsharing".

Did you mean: insert_sharing
2015 Jul 24
0
possible patch for ACL SQL ERROR: duplicate key value violates unique constraint "user_shares_pkey"
...INSERT INTO user_shares (from_user,to_user,dummy) VALUES (NEW.from_user,NEW.to_user,NULL); --- return NULL; EXCEPTION WHEN unique_violation THEN -- someone just inserted the record, update it END; -- Update dummy after INSERT END LOOP; END; $$; CREATE TRIGGER insertsharing BEFORE INSERT ON user_shares FOR EACH ROW EXECUTE PROCEDURE insert_sharing(); - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBVbHxJXz1H7kL/d9rAQIn5gf/dNMQKmmigGrbccGQQrsGU66B6OHvTY7L 1vyh8hgr985KNk2/Ws/usLnAqpl5jhpo8kVPLI8TqcGYLAS/67TOIFrwLKAEBU96 e+Qpb...