From: | Greg Stark <stark(at)mit(dot)edu> |
---|---|
To: | skinneda(at)us(dot)ibm(dot)com |
Cc: | PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13849: Need a parameter added similar to "edb_stmt_level_tx" |
Date: | 2016-01-07 23:50:55 |
Message-ID: | CAM-w4HNcPXzixfv_SfakTo=z8_4LZMTmd04cVkyDOJopLAh7Kg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | chris | 2016-01-08 00:25:26 | BUG #13854: SSPI authentication failure: wrong realm name used |
Previous Message | Nuri Boardman | 2016-01-07 22:45:09 | Re: BUG #13853: initdb to UNC path |