Can I ask Postgresql to ignore errors within a transaction
Posted
by fmark
on Stack Overflow
See other posts from Stack Overflow
or by fmark
Published on 2010-04-30T02:14:46Z
Indexed on
2010/04/30
2:27 UTC
Read the original article
Hit count: 324
I use Postgresql with the PostGIS extensions for ad-hoc spatial analysis. I generally construct and issue SQL queries by hand from within psql. I always wrap an analysis session within a transaction, so if I issue a destructive query I can roll it back.
However, when I issue a query that contains an error, it cancels the transaction. Any further queries elicit the following warning:
ERROR: current transaction is aborted, commands ignored until end of transaction block
Is there a way I can turn this behaviour off? It is tiresome to rollback the transaction and rerun previous queries every time I make a typo.
© Stack Overflow or respective owner