On Wed, 2004-08-18 at 02:48, Greg Stark wrote:
> "Simon Riggs" <[EMAIL PROTECTED]> writes:
> 
> > This behaviour allows much closer mimicking of Oracle and other RDBMS's
> > transactional behaviour
> 
> <begin 2c>This is my single biggest pet peeve with Postgres. When I was first
> starting it was the single most frustrating violation of the "least surprise"
> principle and now that I've been working with it for over a year it's the one
> that most continues to interfere with productive work.
> 
> With Oracle I found it *extremely* useful on many occasions when doing manual
> updates to be able to check out the effects of my statements before committing
> them. It also meant I could do several updates or deletes and commit them all
> together.
> 
> With Postgres I effectively have to work in autocommit mode. Starting over
> from scratch every time I make a typo is infeasible. It feels like trying to
> type in a C program using "cat". I've done it before but it's not something I
> want to repeat often.

It really isn't necessary to do that.  If you are entering commands into
psql manually, either they are so few that you can easily repeat them,
using readline editing, or you can write the commands as a script in an
external file, with BEGIN and END at its top and bottom, and run it with
\i /path/to/file.

If it fails, re-edit it with \!vi /path/to/file and repeat \i

You certainly do not have to work in autocommit mode.  It will be nice
to have nested transactions, but this is not the compelling reason for
doing it.

Oliver Elphick




---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to