Re: Does psql use nested transactions?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Does psql use nested transactions?
Date: 2004-08-19 16:39:43
Message-ID: 87pt5ndquo.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:

> 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,

That's what I meant by feeling like I was typing a C program using "cat".

> 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.

Sure you could do that. But it kind of defeats the purpose of having an
interactive client. It feels like being transported back to the 70s.

In any case neither of these solutions addresses the situation where any of
the steps in the sequence of commands takes a long time to run. It's wasteful
and simply silly to be reexecuting 5 minute queries over and over (nevermind
hour long queries or day-long queries) because I typoed on the select to see
if it worked the way I expected at the end. That's actually the usual time
that I want to double check my work before committing, not simple quick
queries.

Or similarly for the situation of non-deterministic queries. Sometimes I use
random() for loading sample data but then I want to check to make sure things
were distributed the way I wanted...

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-08-19 16:46:38 tablespace and pg_dump/restore
Previous Message Tom Lane 2004-08-19 16:33:56 Re: All three packages ...