Re: Anybody have an Oracle PL/SQL reference at hand?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Anybody have an Oracle PL/SQL reference at hand?
Дата
Msg-id 22700.1091542634@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Anybody have an Oracle PL/SQL reference at hand?  (Gavin Sherry <swm@linuxworld.com.au>)
Ответы Re: Anybody have an Oracle PL/SQL reference at hand?  ("Jim C. Nasby" <decibel@decibel.org>)
Re: Anybody have an Oracle PL/SQL reference at hand?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:

>         BEGIN;
>             SAVEPOINT start;
>             INSERT INTO users VALUES(user || suffix);
>             EXIT;
>         EXCEPTION
>             WHEN UNIQUE_VIOLATION THEN
>                 ROLLBACK TO start;
>                 suffix := suffix + 1;
>         END;

Right.  Essentially, our implementation is supplying the SAVEPOINT and
ROLLBACK TO commands implicitly as part of any block with an EXCEPTION
clause.  When we get around to updating the "Oracle porting" guide in
the plpgsql docs, this will need to be clearly explained.

Depending on how tense you want to be about Oracle compatibility, we
could make people actually write their blocks as above --- that is,
the SAVEPOINT and ROLLBACK commands would be a required part of the
exception-block syntax.  They wouldn't actually *do* anything, but
they would make the code look more like its Oracle equivalent.  I'm not
for this, but maybe someone wants to make the case for it?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Two questions about savepoints: Bug or feature?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unicode restriction