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 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster