| From: | Rodrigo E(dot) De León Plicet <rdeleonp(at)gmail(dot)com> |
|---|---|
| To: | "Shavonne Marietta Wijesinghe" <shavonne(dot)marietta(at)studioform(dot)it> |
| Cc: | "Teemu Torma" <teemu(at)torma(dot)org>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: duplicate key violates unique constraint |
| Date: | 2008-02-26 17:09:28 |
| Message-ID: | a55915760802260909n1c1f4cd2i18fb56ccafa96d83@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Tue, Feb 26, 2008 at 11:36 AM, Shavonne Marietta Wijesinghe
<shavonne(dot)marietta(at)studioform(dot)it> wrote:
> BEGIN
> SAVEPOINT s1;
> ... code here ...
> EXCEPTION
> WHEN ... THEN
> ROLLBACK TO s1;
> ... code here ...
> WHEN ... THEN
> ROLLBACK TO s1;
> ... code here ...
> END;
PostgreSQL doesn't have anonymous blocks.
You need to write a function.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Colin Wetherbee | 2008-02-26 17:33:46 | Re: [SQL] Deploying PostgreSQL on virtualized hardware |
| Previous Message | Alvaro Herrera | 2008-02-26 17:03:25 | Re: duplicate key violates unique constraint |