Greg Sabino Mullane writes:
> The attached patch actually does two related things. First,
> it keeps track of whether or not you are in a trnasaction
> and modifies the prompt slightly when you are by putting
> an asterick at the very front of it.
This is an interesting idea, although you may want to give the user the
option to customize his prompt. Add an escape, maybe %* or %t, with the
meaning "resolves to * if in a transaction block and to the empty string
if not". (The existing escapes were all stolen from tcsh, so look there
if you need an idea.)
> Secondly, it adds a "begin transaction" option that, when
> enabled, ensures that you are always inside a transaction
> while in psql, so you can always rollback.
This should be done in the backend.
--
Peter Eisentraut peter_e@gmx.net