From: Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it>
To: Teemu Torma <teemu@torma.org>
To: pgsql-sql@postgresql.org
Subject: Re: duplicate key violates unique constraint
Date: Tue, 26 Feb 2008 17:36:09 +0100
Message-ID: <017901c87895$b1782380$3102a8c0@dream> (raw)
References: <014401c87887$a8fed450$3102a8c0@dream>
<016401c87891$58237950$3102a8c0@dream>
<20080226162246.GA9865@crankycanuck.ca>
<200802261728.36773.teemu@torma.org>
I wrote the query in the SQL windows provided by the pgadmin.
According to the examples in "Chapter 35. PL/pgSQL - SQL Procedural
Language" i don't see what i did different.
BEGIN
SAVEPOINT s1;
... code here ...
EXCEPTION
WHEN ... THEN
ROLLBACK TO s1;
... code here ...
WHEN ... THEN
ROLLBACK TO s1;
... code here ...
END;
Maybe missing tabs before the statement??
Shavonne
----- Original Message -----
From: "Teemu Torma" <teemu@torma.org>
To: <pgsql-sql@postgresql.org>
Sent: Tuesday, February 26, 2008 5:28 PM
Subject: Re: [SQL] duplicate key violates unique constraint
> On Tuesday 26 February 2008, Andrew Sullivan wrote:
>> Well, except that there's no "EXCEPTION" statement in SQL? Â I think
>> your correspondent was intending for this to be programmatic.
>
> I was thinking pl/pgsql.
>
> Teemu
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
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, teemu@torma.org
Subject: Re: duplicate key violates unique constraint
In-Reply-To: <017901c87895$b1782380$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