Re: [HACKERS] \set AUTOROLLBACK ON

2017-06-28 Thread Joel Jacobson
On Mon, Jun 26, 2017 at 9:35 PM, David G. Johnston wrote: > We already have SET TRANSACTION READ ONLY. But in my use-case I am OK with the query doing write operations, since sometimes you need to test something in prod (that cannot be tested easily locally) but you

Re: [HACKERS] \set AUTOROLLBACK ON

2017-06-26 Thread David Fetter
On Mon, Jun 26, 2017 at 12:35:47PM -0700, David G. Johnston wrote: > On Mon, Jun 26, 2017 at 12:19 PM, David Fetter wrote: > > > On Mon, Jun 26, 2017 at 04:00:55PM +0200, Joel Jacobson wrote: > > > Hi hackers, > > > > > > A colleague of mine wondered if there is a way to always

Re: [HACKERS] \set AUTOROLLBACK ON

2017-06-26 Thread David G. Johnston
On Mon, Jun 26, 2017 at 12:19 PM, David Fetter wrote: > On Mon, Jun 26, 2017 at 04:00:55PM +0200, Joel Jacobson wrote: > > 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 >

Re: [HACKERS] \set AUTOROLLBACK ON

2017-06-26 Thread David Fetter
On Mon, Jun 26, 2017 at 04:00:55PM +0200, Joel Jacobson wrote: > 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

[HACKERS] \set AUTOROLLBACK ON

2017-06-26 Thread Joel Jacobson
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