Re: Procedures

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Procedures
Дата
Msg-id CAFj8pRAMRsC8r0bBsqRz_hiVH+TxOrTa0_0F+c5qBwbNis7=uQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Procedures  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Procedures  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs


po 24. 8. 2020 v 17:01 odesílatel Bruce Momjian <bruce@momjian.us> napsal:
On Sat, Aug 22, 2020 at 01:21:43PM -0700, David G. Johnston wrote:
> On Sat, Aug 22, 2020 at 10:14 AM Bruce Momjian <bruce@momjian.us> wrote:
>
>     On Fri, Aug 21, 2020 at 07:42:35PM -0700, David G. Johnston wrote:
>
>     > [...] the CALL command.  If the CALL command is not part of an explicit
>     > transaction a procedure can also manage multiple transactions during its
>     > execution.
>
>     OK, how is this updated patch?
>
>
> Looks good.  I felt "begin and commit" was a bit wordy but it works.

So, I was worried that "manage multiple transactions" could imply
something like savepoints, which can be managed by functions.  It is
really the top-level begin/commit that is unique for procedures.

Functions is executed under outer transaction every time - rollback to save point hasn't impact on outer transaction. Inside procedures (in special case) can be transactions ended (by statements COMMIT or ROLLBACK). Immediately is started new transaction.

 

--
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Create a Foreign Table for PostgreSQL CSV Logs
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Procedures