Re: BUG #13849: Need a parameter added similar to "edb_stmt_level_tx" - Mailing list pgsql-bugs

From Greg Stark
Subject Re: BUG #13849: Need a parameter added similar to "edb_stmt_level_tx"
Date
Msg-id CAM-w4HNcPXzixfv_SfakTo=z8_4LZMTmd04cVkyDOJopLAh7Kg@mail.gmail.com
Whole thread Raw
In response to BUG #13849: Need a parameter added similar to "edb_stmt_level_tx"  (skinneda@us.ibm.com)
List pgsql-bugs
Postgres supports the behaviour you want but the interface is
different. Instead you need to create a subtransaction around each
statement you want to catch errors in. The way to do this depends on
the PL language or language binding you're executing these commands
in. In psql you set ON_ERROR_ROLLBACK on. In pl/pgsql you add BEGIN
blocks (http://www.postgresql.org/docs/9.5/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING),
in plpython and other languages they're mapped to the language's
exception handling, see
http://www.postgresql.org/docs/current/static/plpython-subtransaction.html

EDB's documentation does say "Note: Use edb_stmt_level_tx set to TRUE
only when absolutely necessary, as this may cause a negative
performance impact." which makes me assume it is just doing the same
thing ON_ERROR_ROLLBACK does which is wrapping every statement in a
subtransaction. EDB is in the business of adding features to make
things compatible with Oracle but Postgres less so. If there was a
major advantage to the Oracle interface or it was in the standard then
it might be more compelling but just for compatibility with Oracle
probably not. Especially since Postgres has had bad experiences with
server-side configuration options that change the transaction
semantics in the past.

pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: BUG #13850: Need a parameter added similar to "edb_stmt_level_tx"
Next
From: chris@chrullrich.net
Date:
Subject: BUG #13854: SSPI authentication failure: wrong realm name used