Skip site navigation (1) Skip section navigation (2)

Re: psql and autocommit

From: Tsirkin Evgeny <tsurkin(at)mail(dot)jct(dot)ac(dot)il>
To: Stephen Kennedy <skennedy(at)tissat(dot)es>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: psql and autocommit
Date: 2004-08-24 08:28:09
Message-ID: Pine.LNX.4.58.0408241124210.6700@p-roman.jct.ac.il (view raw or flat)
Thread:
Lists: pgsql-admin
On Tue, 24 Aug 2004, Stephen Kennedy wrote:
You are all right .However i was talking about the writing
shell scripts and running 
psql -c 
from it .THIS is a big problem if no autocommit is setted on 
since at the end of the psql -c command there is a disconnect
and you have to add a commit to it BEFOR this disconnect.very 
unhandy .
However i understood from Tom that this is solved in 7.4 ,
just not yet ready to switch to it from my 7.3 server.
Thanks
> Just a note to clarify sqlplus
> 
> It does start in noautocommit as you say.
> However,  it issues a commit when you exit (with quit, Ctrl-D or whatever) 
> which is (in my opinion) incorrect, and very much worth taking into account
> when writing scripts for Oracle.
> I think it should automatically issue a rollback on exit.
> 
> regards,
> 
> Stephen.
> 
> Radu-Adrian Popescu wrote:
> 
> > Tsirkin Evgeny wrote:
> > [snip]
> >
> >> commit to my shell scripts.I beleave that automatically
> >> commiting the psql -c queries is very logical thing.
> >
> >
> > I'm sure there are people who disagree with that statement. For 
> > instance Oracle's sqlplus starts in noautocommit by default. And I've 
> > found that to be a good thing actually.
> > For what it's worth I also think default client policy may as well be 
> > left unchanged, or there will be a lot of baffled people.
> >
> > Regards,
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 

-- 
Evgeny.

In response to

pgsql-admin by date

Next:From: EdgarsDate: 2004-08-24 10:27:12
Subject: pg dump restore
Previous:From: Stephen KennedyDate: 2004-08-24 08:17:23
Subject: Re: psql and autocommit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group