Re: define transaction within pg/psql. Necessary?

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: define transaction within pg/psql. Necessary?
Дата
Msg-id 2f4958ff1002180206v1e3c3f49q81c548c7ed1c91cb@mail.gmail.com
обсуждение исходный текст
Ответ на define transaction within pg/psql. Necessary?  (Antonio Goméz Soto<antonio.gomez.soto@gmail.com>)
Список pgsql-general
all statements in postgresql are self contained transactions, and you cannot change that.
To answer your question directly, you don't have to, it will all be a transaction.

The best example of that is to run following query in psql:

CREATE TEMP TABLE foo() ON COMMIT DROP;


the table will not exists anymore after running it. Precisely because it was 'automatically' wrapped in begin/commit, and dropped at the end of it.


hth

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Define permissions at database level
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: define transaction within pg/psql. Necessary?