title: Do stored procedures run in database transaction in Postgres?
body: <p>If a stored procedure fails in middle, are changes at that point from the beginning of SP rolled back implicitly or do we have to write any explicit code to make sure that SP runs in a database transaction only?</p>