Re: duplicate key violates unique constraint

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: duplicate key violates unique constraint
Date: 2008-02-26 16:22:46
Message-ID: 20080226162246.GA9865@crankycanuck.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Teemu Torma 2008-02-26 16:28:36 Re: duplicate key violates unique constraint
Previous Message Shavonne Marietta Wijesinghe 2008-02-26 16:05:01 Re: duplicate key violates unique constraint