Re: Does psql use nested transactions?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Does psql use nested transactions?
Дата
Msg-id 87pt5ndquo.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Does psql use nested transactions?  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-hackers
Oliver Elphick <olly@lfix.co.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: tablespace and sequences?
Следующее
От: Fabien COELHO
Дата:
Сообщение: tablespace and pg_dump/restore