Re: STL problem in stored procedures - Mailing list pgsql-general

From Tom Lane
Subject Re: STL problem in stored procedures
Date
Msg-id 1163.1130296697@sss.pgh.pa.us
Whole thread Raw
In response to Re: STL problem in stored procedures  (Andreas Seltenreich <seltenreich@gmx.de>)
List pgsql-general
Andreas Seltenreich <seltenreich@gmx.de> writes:
> Tom Lane schrob:
>> And on top of that, what if the error was one that the backend can't
>> recover from except by a transaction abort? If some level of the C++
>> code thinks it can catch and recover from the error, you've left
>> things in a pretty bad state.

> Hmm, but if you replace "C++" with "C" and "catch" with "PG_TRY" in
> that sentence, wouldn't that be business as usual?

Sure, but one hopes that someone writing PG_TRY is clued-in enough to
consider this issue.  The thing that is worrying me here is that generic
STL code written by someone who never heard of Postgres is going to try
to make decisions about whether it can recover from an error thrown by
some part of the backend.

            regards, tom lane

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Map of Postgresql Users (OT)
Next
From: "surabhi.ahuja"
Date:
Subject: Re: a stored procedure ..with integer as the parameter