Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2012-08-17 Thread Ross Reedstrom
On Wed, Aug 15, 2012 at 10:26:55PM -0400, Bruce Momjian wrote: > On Mon, Nov 14, 2011 at 04:19:30PM -0600, Ross Reedstrom wrote: > > On Wed, Sep 28, 2011 at 11:47:51AM -0700, David Fetter wrote: > > > On Wed, Sep 28, 2011 at 02:25:44PM -0400, Gurjeet Singh wrote: > > > > On Wed, Sep 28, 2011 at 1:5

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2012-08-16 Thread Daniel Farina
On Mon, Nov 14, 2011 at 3:05 PM, Ross Reedstrom wrote: > On Mon, Nov 14, 2011 at 02:45:04PM -0800, Will Leinweber wrote: >> My coworker Dan suggested that some people copy and paste scripts. However >> I feel that that is an orthogonal problem and if there is a very high rate >> of input psql shou

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2012-08-15 Thread Bruce Momjian
On Mon, Nov 14, 2011 at 04:19:30PM -0600, Ross Reedstrom wrote: > On Wed, Sep 28, 2011 at 11:47:51AM -0700, David Fetter wrote: > > On Wed, Sep 28, 2011 at 02:25:44PM -0400, Gurjeet Singh wrote: > > > On Wed, Sep 28, 2011 at 1:51 PM, Kevin Grittner > > > > > > wrote: > > > > > > > Alvaro Herrera

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-11-14 Thread Will Leinweber
My coworker Dan suggested that some people copy and paste scripts. However I feel that that is an orthogonal problem and if there is a very high rate of input psql should detect that and turn interactive off. And I still strongly feel that on_error_rollback=interactive should be the default. Until

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-11-14 Thread Ross Reedstrom
On Mon, Nov 14, 2011 at 02:45:04PM -0800, Will Leinweber wrote: > My coworker Dan suggested that some people copy and paste scripts. However > I feel that that is an orthogonal problem and if there is a very high rate > of input psql should detect that and turn interactive off. And I > still strong

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-11-14 Thread Ross Reedstrom
On Wed, Sep 28, 2011 at 11:47:51AM -0700, David Fetter wrote: > On Wed, Sep 28, 2011 at 02:25:44PM -0400, Gurjeet Singh wrote: > > On Wed, Sep 28, 2011 at 1:51 PM, Kevin Grittner > > wrote: > > > > > Alvaro Herrera wrote: > > > > > > > See ON_ERROR_ROLLBACK > > > > http://www.postgresql.org/docs

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Will Leinweber
On Wed, Sep 28, 2011 at 10:39 AM, Marko Tiikkaja wrote: >  Simply add this to your .psqlrc: > > \set ON_ERROR_ROLLBACK on Thank you Marko and Alvaro for pointing me in the right direction. I set it to 'interactive', which I think makes the most sense. I do wish this behavior was a little more d

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Daniel Farina
On Wed, Sep 28, 2011 at 1:02 PM, Kevin Grittner wrote: > Alvaro Herrera wrote: > >>> ON_ERROR_ROLLBACK ["on" can be a problem in a script file] > >> So set it to "interactive". > > I think we have an opportunity for a documentation enhancement there. In the same vein, I think there may also be s

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Kevin Grittner
Alvaro Herrera wrote: >> ON_ERROR_ROLLBACK ["on" can be a problem in a script file] > So set it to "interactive". I think we have an opportunity for a documentation enhancement there. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your sub

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Alvaro Herrera
Excerpts from Stephen Frost's message of mié sep 28 16:22:58 -0300 2011: > Be careful when running scripts, however.. Any invocation of psql will > read you .psqlrc and if you've got ON_ERROR_ROLLBACK set there then > psql -f blah ; will pick up on that and you'll end up running every > command

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Stephen Frost
* Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: > Alvaro Herrera wrote: > > See ON_ERROR_ROLLBACK > > http://www.postgresql.org/docs/9.0/static/app-psql.html > > I had missed that. Dang, this database product is rich with nice > features! :-) Be careful when running scripts, however..

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread David Fetter
On Wed, Sep 28, 2011 at 02:25:44PM -0400, Gurjeet Singh wrote: > On Wed, Sep 28, 2011 at 1:51 PM, Kevin Grittner > wrote: > > > Alvaro Herrera wrote: > > > > > See ON_ERROR_ROLLBACK > > > http://www.postgresql.org/docs/9.0/static/app-psql.html > > > > I had missed that. Dang, this database prod

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Gurjeet Singh
On Wed, Sep 28, 2011 at 1:51 PM, Kevin Grittner wrote: > Alvaro Herrera wrote: > > > See ON_ERROR_ROLLBACK > > http://www.postgresql.org/docs/9.0/static/app-psql.html > > I had missed that. Dang, this database product is rich with nice > features! :-) > +1 I would like it to be on/interactiv

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Kevin Grittner
Alvaro Herrera wrote: > See ON_ERROR_ROLLBACK > http://www.postgresql.org/docs/9.0/static/app-psql.html I had missed that. Dang, this database product is rich with nice features! :-) -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subs

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Kevin Grittner
Gurjeet Singh wrote: > Will Leinweber wrote: > >> I ruined a 5 hour UPDATE by typoing a table name on a SELECT to >> verify the update worked. Ouch! I normally use tab-completion or copy/paste to save myself from myself in such situations. >> I only later found out about SAVEPOINT, which I

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Alvaro Herrera
Excerpts from Will Leinweber's message of mar sep 27 20:57:52 -0300 2011: > I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify > the update worked. I suppose I have no one else to blame, but it was > really frustrating, to say the least. I assume this has happened to > others a

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Marko Tiikkaja
On 28/09/2011 02:57, Will Leinweber wrote: psql console, while in a transaction, and while in interactive mode, should savepoint for me. You are lucky, since that feature has been in psql for some time already. Simply add this to your .psqlrc: \set ON_ERROR_ROLLBACK on -- Marko Tiikkaja

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Gurjeet Singh
On Tue, Sep 27, 2011 at 7:57 PM, Will Leinweber wrote: > I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify > the update worked. I suppose I have no one else to blame, but it was > really frustrating, to say the least. I assume this has happened to > others as well. > > I only

[HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Will Leinweber
I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify the update worked. I suppose I have no one else to blame, but it was really frustrating, to say the least. I assume this has happened to others as well. I only later found out about SAVEPOINT, which I immediately ran the next t