X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4F53E9FA5E9 for ; Mon, 24 Jul 2006 10:04:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 18650-02 for ; Mon, 24 Jul 2006 10:04:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 6DD6C9FA5BF for ; Mon, 24 Jul 2006 10:04:10 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr4.postgresql.org (Postfix) with ESMTP id 3420B5AF5CE for ; Mon, 24 Jul 2006 13:04:09 +0000 (GMT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 3BEB6746D1; Mon, 24 Jul 2006 14:04:03 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 0198715EA6; Mon, 24 Jul 2006 14:04:02 +0100 (BST) Message-ID: <44C4C542.8080506@archonet.com> Date: Mon, 24 Jul 2006 14:04:02 +0100 From: Richard Huxton User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: mario.splivalo@mobart.hr Cc: pgsql-sql@postgresql.org Subject: Re: Primary key constraint violation without error? References: <1153743159.28381.15.camel@localhost.localdomain> In-Reply-To: <1153743159.28381.15.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200607/295 X-Sequence-Number: 25869 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