pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it>
To: pgsql-sql@postgresql.org
Subject: duplicate key violates unique constraint
Date: Tue, 26 Feb 2008 15:55:42 +0100
Message-ID: <014401c87887$a8fed450$3102a8c0@dream> (raw)

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

view thread (17+ messages)  latest in thread

Message-ID: <014401c87887$a8fed450$3102a8c0@dream>
Permalink:  ../014401c87887$a8fed450$3102a8c0@dream/
Also on:    postgresql.org/message-id/014401c87887$a8fed450$3102a8c0@dream

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: shavonne.marietta@studioform.it
  Subject: Re: duplicate key violates unique constraint
  In-Reply-To: <014401c87887$a8fed450$3102a8c0@dream>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox