Re: [SQL] Transactions and Exceptions

2007-06-26 Thread Bart Degryse
Richard Huxton <[EMAIL PROTECTED]> 2007-06-22 19:00 >>> >Bart Degryse wrote: >>> 2. Using dblink / dbi-link to reconnect to the database, which means >>> your logging will take place in its own transaction. >> This I like more. Though I don't use either dblink nor dbi-link, I do use >> this

Re: [SQL] Transactions and Exceptions

2007-06-22 Thread Bart Degryse
>>> Richard Huxton <[EMAIL PROTECTED]> 2007-06-22 15:24 >>> >Bart Degryse wrote: >> Dear all, >> I'm having a problem with transactions and exceptions and need your advice. >> I want a function to do two things: >> - log something to a table (which is basically an insert) >> - raise an exception u

Re: [SQL] Transactions and Exceptions

2007-06-22 Thread Richard Huxton
Bart Degryse wrote: 2. Using dblink / dbi-link to reconnect to the database, which means your logging will take place in its own transaction. This I like more. Though I don't use either dblink nor dbi-link, I do use this kind of 'double' connections already for other purposes in which transactio

Re: [SQL] Transactions and Exceptions

2007-06-22 Thread Richard Huxton
Bart Degryse wrote: Dear all, I'm having a problem with transactions and exceptions and need your advice. I want a function to do two things: - log something to a table (which is basically an insert) - raise an exception under certain conditions My problem is that when I raise the exception the

[SQL] Transactions and Exceptions

2007-06-22 Thread Bart Degryse
Dear all, I'm having a problem with transactions and exceptions and need your advice. I want a function to do two things: - log something to a table (which is basically an insert) - raise an exception under certain conditions My problem is that when I raise the exception the insert is rolled back.