Mario Splivalo wrote:
Actually it's not violation, but I get no error message on violating it...
CREATE OR REPLACE FUNCTION punimessages() RETURNS bool AS $BODY$ declare userId users%ROWTYPE; begin truncate table mes_del;
^^^^^^^^^^^^^^^^^^^^^^^ This at the start of your inserts is why you're not seeing an error :-) -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend