Re: Primary key constraint violation without error?

From: Richard Huxton <dev(at)archonet(dot)com>
To: mario(dot)splivalo(at)mobart(dot)hr
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Primary key constraint violation without error?
Date: 2006-07-24 13:04:02
Message-ID: 44C4C542.8080506@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2006-07-24 13:05:32 Re: Primary key constraint violation without error?
Previous Message Mario Splivalo 2006-07-24 12:12:39 Primary key constraint violation without error?