> 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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to