Re: Anybody have an Oracle PL/SQL reference at hand? - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Anybody have an Oracle PL/SQL reference at hand?
Date
Msg-id 4110421E.6090904@familyhealth.com.au
Whole thread Raw
In response to Re: Anybody have an Oracle PL/SQL reference at hand?  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-hackers
>>
>>
>>>        BEGIN;
>>>            SAVEPOINT start;
>>>            INSERT INTO users VALUES(user || suffix);
>>>            EXIT;
>>>        EXCEPTION
>>>            WHEN UNIQUE_VIOLATION THEN
>>>                ROLLBACK TO start;
>>>                suffix := suffix + 1;
>>>        END;

> By the way, while I know Oracle won't abort the transaction, they might
> rollback whatever work the command that failed had done; I'm not really
> sure how that's handled.

How about a new EXCEPTION clause:

EXCEPTION NO ROLLBACKWHEN UNIQUE...

Chirs



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: pg_dump bug fixing
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: pgxs: build infrastructure for extensions v4