Re: psql CLI: warn about ongoing transaction on exit

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: psql CLI: warn about ongoing transaction on exit
Дата
Msg-id 1294.76.225.157.205.1190096158.squirrel@76.225.157.205
обсуждение исходный текст
Ответ на Re: psql CLI: warn about ongoing transaction on exit  (Martin Pitt <martin@piware.de>)
Список pgsql-bugs
Martin Pitt said:
> If you just output a rollback command on exit, then it is already too
> late to rescue the pending transaction, so I'm not sure whether that
> would help this use case so much.

Well, the DBA can always replay the transaction manually -- I think
notifying the DBA that their modifications have been discarded
is actually more important. Presumably this isn't a particularly
common case...

> What do you think about displaying a different prompt when a
> transaction is pending, like showing the number of open transactions
> in parentheses or so?

Well, there can be at most one active transaction associated with
a given database session. In any case, this feature already exists:
see the %x escape sequence for the PROMPT[1-3] psql variables.

-Neil

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

Предыдущее
От: Martin Pitt
Дата:
Сообщение: Re: psql CLI: warn about ongoing transaction on exit
Следующее
От: "Jarl Petter Kvalsvik"
Дата:
Сообщение: Re: BUG #2881: FATAL: could not reattach to shared memory (Win32)