Re: Does psql use nested transactions?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Does psql use nested transactions?
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A744A@Herge.rcsinc.local
обсуждение исходный текст
Ответ на Does psql use nested transactions?  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: Does psql use nested transactions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> In 8.0 beta 1 I just tried:
>
>      psql template1
>      > begin;
>      > select * from pg_class;
>      ... got stuff ...
>      > select * from aaa;
>      ERROR: relation "zzz" does not exist
>      > select * from pg_class;
>      ERROR: current transaction is aborted....
>
> Should psql run every statement in a nested transaction and only
rollback
> that TX? Or is that not possible/desirable. If possible, this would be
a
> *great* feature for those  of use prone to mis-spellings.

Nested transactions are not designed to help you with spelling errors.
They are designed to give you more flexible options with rolling back
data to keep it in a valid state.

psql is designed to follow the same logical statement progression as any
other connection to the database.  Your suggestion could muck up sql
scripts piped through it to the database.

If you make a lot of spelling errors, just macro 'savepoint x' and fire
that when typing multiple related statements into psql after each
statement.

Merlin


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

Предыдущее
От: "Min Xu (Hsu)"
Дата:
Сообщение: Re: We have got a serious problem with pg_clog/WAL synchronization
Следующее
От: Robert Treat
Дата:
Сообщение: Re: Release notes for upgrading