Re: JDBC behaviour
От | Vladimir Sitnikov |
---|---|
Тема | Re: JDBC behaviour |
Дата | |
Msg-id | CAB=Je-Gv6-RYpkF-bbURfKbespD2_hFEF-KaNGVeUMAbXx7+GA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: JDBC behaviour (Mark Rotteveel <mark@lawinegevaar.nl>) |
Список | pgsql-jdbc |
Unfortunately, OP seems to ignore all the inputs, thus no "advanced" recommendations. Mark>I understand that and indeed this isn't something that should be handled Mark>by the driver psql has special "transparent auto-rollback-to-auto-savepoint", thus there's a certain trend to workaround database strictness. As I posted earlier, there is a work-in-progress implementation of exactly that functionality at the driver level: https://github.com/pgjdbc/pgjdbc/pull/477 Of course it won't be able to "rollback just a single row of a whole batch", however batch DML is often split to sub-batches. The savepoints can be in between those sub-batches. Just one more time: 1) If the application is developed via PostgreSQL from the ground up, then "transacted aborted" is more likely to be a feature. 2) If the application is migrated from other databases, then excessive strictness might be a "bug". That is, the application should be eventually be adapted not to throw exceptions, however, "transaction aborted" might easily be a blocker to migration to PG. Frankly speaking, "autosavepoint" is somewhat that might sense. It is not something crazy like returning 0 from 0/0. Vladimir
В списке pgsql-jdbc по дате отправления: