[HACKERS] \set AUTOROLLBACK ON

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема [HACKERS] \set AUTOROLLBACK ON
Дата
Msg-id CAASwCXc3v9ErsVHcr+O6UwKS3M-7WRi+3yb4qKXE44MO6cXwjw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] \set AUTOROLLBACK ON  (David Fetter <david@fetter.org>)
Список pgsql-hackers
Hi hackers,

A colleague of mine wondered if there is a way to always run
everything you type into psql in a db txn and automatically rollback
it as soon as it finish.
I couldn't think of any way to do so, but thought it would be a nice
feature and probably quite easy to add to psql, so I thought I should
suggest it here.

The typical use-case is you are doing something in production that you
just want to
a) test if some query works like expected and then rollback
or,
b) read-only queries that should not commit any changes anyway, so
here the rollback would just be an extra layer of security, since your
SELECT might call volatile functions that are actually not read-only

Thoughts?

/Joel



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] A mistake in a comment
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] intermittent failures in Cygwin from select_paralleltests