Skip site navigation (1) Skip section navigation (2)

duplicate key violates unique constraint

From: "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: duplicate key violates unique constraint
Date: 2008-02-26 14:55:42
Message-ID: 014401c87887$a8fed450$3102a8c0@dream (view raw or flat)
Thread:
Lists: pgsql-sql
Hello 

During an "INSERT INTO" I get an "Error - duplicate key violates unique constraint...."

Is there any way, that i can test the error. Something like this??

IF error = "duplicate key violates unique constraint" then
    do something
else 
    insert into
end if


Thanks

Shavonne

Responses

pgsql-sql by date

Next:From: TJ O'DonnellDate: 2008-02-26 14:56:23
Subject: Re: Deploying PostgreSQL on virtualized hardware
Previous:From: Adrian KlaverDate: 2008-02-26 05:08:39
Subject: Re: Bounce test

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group