Re: We still claim "cannot begin/end transactions in PL/pgSQL"

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: We still claim "cannot begin/end transactions in PL/pgSQL"
Дата
Msg-id
0e6e7400-47fc-b30a-3532-831a6d566934@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
We still claim "cannot begin/end transactions in PL/pgSQL" Tom Lane <tgl@sss.pgh.pa.us>
Re: We still claim "cannot begin/end transactions in PL/pgSQL" Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: We still claim "cannot begin/end transactions in PL/pgSQL" Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
On 5/31/18 14:01, Peter Eisentraut wrote:
> There are three occurrences:
> 
> The occurrence in exec_prepare_plan() could never be reached AFAICT,
> because SPI_prepare_params() does not produce those SPI_prepare_params()
> error values in the first place.  So remove them altogether.
> 
> The occurrence in exec_stmt_execsql() can be reached by running for
> example SAVEPOINT, or any other TransactionStmt other than COMMIT and
> ROLLBACK, which are intercepted by PL/pgSQL.  So we still need an error
> message there.  Unfortunately, we don't know which TransactionStmt
> caused the error, so the error has to be pretty generic.
> 
> The occurrence in exec_stmt_dynexecute() can be reached using something
> like EXECUTE 'COMMIT', which is not supported/not implemented.  Hence a
> tweaked error message there as well.
> 
> Possible patch attached.

Committed.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления
От: Ashutosh Bapat
Дата:
От: Kyotaro HORIGUCHI
Дата:
FAQ