When you run a SQL statement (or set of statements), you can get this error in PostgreSQL:
ERROR: current transaction is aborted, commands ignored until end of transaction block
********** Error **********
ERROR: current transaction is aborted, commands ignored until end of transaction block
SQL state: 25P02
This is because there was a failure in executing the statement(s) the last time they were run and the statement(s) where wrapped in a single transaction. The transaction is half complete and so you can’t run another command.
To fix this, run rollback transaction;. This will roll back the last transaction and you can fix it and have another go.