Thank you, where should I place comit?
I appreciate your comment "A transaction cannot be ended inside a block with exception handlers."
If I've understood well that means that if I use an exception handler I will not be able to finish the transaction.
It surprises me a lot that Postgresql is not capable to work with an error in the transaction so you can rollback. Other languages...
User Profile
Collapse
-
Problem with a Postgresql's procedure to deal with exception in transaction
Hello,
I'm trying to control a transaction with a procedure but I'm getting an error I cannot resolve.
This is the code:
SQL
drop table if exists cuentas;
create table cuentas (
id serial,
nombre varchar(100) not null,
saldo dec(15,2) not null,
primary key(id),
constraint saldo CHECK(saldo > 5000)
);
...
No activity results to display
Show More
Leave a comment: