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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

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