From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: duplicate key violates unique constraint
Date: Tue, 26 Feb 2008 11:22:46 -0500
Message-ID: <20080226162246.GA9865@crankycanuck.ca> (raw)
In-Reply-To: <016401c87891$58237950$3102a8c0@dream>
References: <014401c87887$a8fed450$3102a8c0@dream>
<200802261617.39936.teemu@torma.org>
<016401c87891$58237950$3102a8c0@dream>
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
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: ajs@crankycanuck.ca
Subject: Re: duplicate key violates unique constraint
In-Reply-To: <20080226162246.GA9865@crankycanuck.ca>
* 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