Savepoints in PL/pgSQL

Поиск
Список
Период
Сортировка
От BigSmoke
Тема Savepoints in PL/pgSQL
Дата
Msg-id 1166540710.237718.91170@80g2000cwy.googlegroups.com
обсуждение исходный текст
Ответы Re: Savepoints in PL/pgSQL  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-general
I understand that due to a lack of nested transaction support, it is
not possible to use START TRANSACTION within a PL/PgSQL function. What
I, however, do not understand is why I can't use SAVEPOINT either. I'm
writing long test functions wherein, at the start of the function, I'd
like to define all test data followed by a "SAVEPOINT
fresh_test_data;". Will this become possible in the (near) future? I
mean, savepoints are of limited use to me if they imply that I can't
stick my tests in stored procedures.

On a side note: I've seen a comment on this list that the error message
of trying to use a SAVEPOINT in PL/pgSQL isn't too clear (compared with
the error message for using SAVEPOINT in an SQL function). I can second
this. However, I noticed that the message is much clearer when you
EXECUTE the SAVEPOINT command.


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

Предыдущее
От: John McCawley
Дата:
Сообщение: Re: Creating an Independant Application
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: Let's play bash the search engine