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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема We still claim "cannot begin/end transactions in PL/pgSQL"
Дата
Msg-id 15479.1527265001@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: We still claim "cannot begin/end transactions in PL/pgSQL"  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
I notice there are still several places in pl_exec.c like this:

        case SPI_ERROR_TRANSACTION:
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                     errmsg("cannot begin/end transactions in PL/pgSQL"),
                     errhint("Use a BEGIN block with an EXCEPTION clause instead.")));
            break;

At best, the wording of these error messages is now obsolete.  I'm not
sure if we expect them to be reachable at all.  If they should be
can't-happen cases, I'd suggest just deleting them and letting control
fall to the generic default: cases in each switch.  If they are reachable,
the messages need work.

            regards, tom lane


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

Предыдущее
От: Greg Clough
Дата:
Сообщение: RE: Enhancement Idea - Expose the active value of a parameter inpg_settings
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Enhancement Idea - Expose the active value of a parameter in pg_settings