Re: Behaviour of sql language function

Поиск
Список
Период
Сортировка
От Marcelo Sena
Тема Re: Behaviour of sql language function
Дата
Msg-id CAPmRTtMtNFeGEMewhntOyf3GPt=O=OU+N1ZZcj7hW9Qem5E7aA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Behaviour of sql language function  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-docs
Oh, nice, I haven't noticed that fact. Thanks!

--
Marcelo Lacerda


On Thu, Apr 26, 2012 at 5:53 PM, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
Marcelo Sena <marceloslacerda@gmail.com> wrote:

> So, is it documented somewhere?

http://www.postgresql.org/docs/current/static/tutorial-transactions.html

| PostgreSQL actually treats every SQL statement as being executed
| within a transaction. If you do not issue a BEGIN command, then
| each individual statement has an implicit BEGIN and (if
| successful) COMMIT wrapped around it.

Combine this with the fact that a function can only run in the
context of a command, like:

   SELECT func_name();

You have your guarantee -- as long as you understand the possible
action of subtransactions (like savepoints).

-Kevin

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

Предыдущее
От: Selena Deckelmann
Дата:
Сообщение: Re: "TL;DR:"
Следующее
От: Tom Lane
Дата:
Сообщение: Documentation of underlying functions for statistics views