Re: Error handling in plperl and pltcl
От | Tom Lane |
---|---|
Тема | Re: Error handling in plperl and pltcl |
Дата | |
Msg-id | 737.1102102086@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Error handling in plperl and pltcl (Jan Wieck <JanWieck@Yahoo.com>) |
Список | pgsql-hackers |
Jan Wieck <JanWieck@Yahoo.com> writes: > Your suggestion to expose a plain savepoint interface to the programmer > leads directly to the possiblity to commit a savepoint made by a > sub-function in the caller and vice versa - which if I understood Tom > correctly is what we need to avoid. If we expose a savepoint-style interface in the PLs, it'll need to be restricted to the cases we can actually support. I don't have a problem with the idea in the abstract, but there was no time to do it for 8.0. I think we can add that on in 8.1, or later, without creating any backwards-compatibility issues compared to where we are now --- at least not for pltcl and plperl. (We might regret having tied subtransactions to exceptions in plpgsql, not sure.) The real issue is whether the required restrictions would be ugly enough that savepoint syntax doesn't seem like a nice API. I thought so when I did the coding for plpgsql, but I'm less sure at the moment. You'd probably have to prototype an implementation to find out for certain. It might be that the only real restriction is to make savepoint names local to functions (a/k/a savepoint levels), which wouldn't be bad at all. regards, tom lane
В списке pgsql-hackers по дате отправления: