Re: duplicate key violates unique constraint - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: duplicate key violates unique constraint
Date
Msg-id 20080226162246.GA9865@crankycanuck.ca
Whole thread Raw
In response to Re: duplicate key violates unique constraint  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
Responses Re: duplicate key violates unique constraint  (Teemu Torma <teemu@torma.org>)
List pgsql-sql
On Tue, Feb 26, 2008 at 05:05:01PM +0100, Shavonne Marietta Wijesinghe wrote:
> Thank you. I tried as you said. But i get a ERROR:  syntax error at or near 
> "INSERT" at character 9
> I don't see anything wrong with the code..

Well, except that there's no "EXCEPTION" statement in SQL?  I think your
correspondent was intending for this to be programmatic.  You can do what
you want with a subtransaction, though.  Look into savepoints in the manual.

A



pgsql-sql by date:

Previous
From: "Shavonne Marietta Wijesinghe"
Date:
Subject: Re: duplicate key violates unique constraint
Next
From: Teemu Torma
Date:
Subject: Re: duplicate key violates unique constraint