Atomicity in DB transactions (Rollback related)
| От | Jasbinder Singh Bali |
|---|---|
| Тема | Atomicity in DB transactions (Rollback related) |
| Дата | |
| Msg-id | a47902760706180845s4fea3f43w489c757bc4999b10@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: Atomicity in DB transactions (Rollback related)
|
| Список | pgsql-general |
Hi,
I have a Pl/Perlu function in which I have a statement like this:
*******************
my $query_tbl_l_header = $dbh->prepare("SELECT sp_insert_tbl_l_header(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
my $exec_l_from =$query_tbl_l_header->execute($unmask_id,$from,$to,$sender,$subject,$replyto,$cc,$bcc,$messageid,$inreplyto,$reference,$mversion,$con_type,$con_id,$con_des,$con_enc,$con_length,$con_dis);
*******************
even if this execute, that calls a function sp_insert_tbl_l_header, fails,
subsequent trasactions continue without failing the whole perl function there and then and makes the Db inconsistent.
Shouldn't the whole function fail and exit at that particular failure and don't continue?
Please let me know how do these transactions work in postgres.
Thanks,
Jas
I have a Pl/Perlu function in which I have a statement like this:
*******************
my $query_tbl_l_header = $dbh->prepare("SELECT sp_insert_tbl_l_header(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
my $exec_l_from =$query_tbl_l_header->execute($unmask_id,$from,$to,$sender,$subject,$replyto,$cc,$bcc,$messageid,$inreplyto,$reference,$mversion,$con_type,$con_id,$con_des,$con_enc,$con_length,$con_dis);
*******************
even if this execute, that calls a function sp_insert_tbl_l_header, fails,
subsequent trasactions continue without failing the whole perl function there and then and makes the Db inconsistent.
Shouldn't the whole function fail and exit at that particular failure and don't continue?
Please let me know how do these transactions work in postgres.
Thanks,
Jas
В списке pgsql-general по дате отправления: