Run psql with ON_ERROR_STOP set