Re: [SQL] transactions and ecpg

2012-09-23 Thread Dmitriy Igrishin
Hey Wayne 2012/9/22 Wayne Cuddy > I'm looking at some code that a coworker ported from Informix to > Postgres 9.0. The Informix database did not have transaction logging > enabled thus no begins/aborts/commits/rollbacks where in the original > code. The way the code has been ported there are sti

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

Re: [SQL] transactions in functions, possible bug or what I'm doing

2004-11-19 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Fri, Nov 19, 2004 at 12:59:07PM +, Richard Huxton wrote: >> You can have what are called "savepoints" in version 8.0 though, which >> lets you trap errors and rollback to a named (saved) point in your function. > Savepoints in functions don't work

Re: [SQL] transactions in functions, possible bug or what I'm doing

2004-11-19 Thread Michael Fuhr
On Fri, Nov 19, 2004 at 12:59:07PM +, Richard Huxton wrote: > You can have what are called "savepoints" in version 8.0 though, which > lets you trap errors and rollback to a named (saved) point in your function. Savepoints in functions don't work as of 8.0.0beta4, unless I'm doing something

Re: [SQL] transactions in functions, possible bug or what I'm doing

2004-11-19 Thread Richard Huxton
Riccardo G. Facchini wrote: Why does select test_without_transaction(); return this info: "ABCD" (as should be) and select test_with_transaction(); returns this error? ERROR: SPI_prepare() failed on "start transaction" CONTEXT: PL/pgSQL function "test_with_transaction" line 6 at SQL statement I'v

Re: [SQL] transactions

2003-07-29 Thread Josh Berkus
Viorel, > The problem is that my web browser hangs on this query and stays that way a > lot [like 30 minutes -- i forgot about it and after 30 minutes it was still > trying to open the result page] I think this is a problem inside one of the functions; either you have an endless loop, or you are

Re: [SQL] Transactions in PLPGSQL?

2001-02-06 Thread Anatoly K. Lasareff
> "KC" == Ken Corey <[EMAIL PROTECTED]> writes: KC> Hi All! KC> Are the BEGIN/END; seen in a typical PL/PGSQL function a transaction wrapper, KC> or do I need to add another BEGIN/END block? No, BEGIN & END in plpgsql function are not transaction control statemens, but elements of plpgsq

Re: [SQL] transactions surrounding extension functions

2000-09-28 Thread Peter Eisentraut
Forest Wilkinson writes: > Does this mean that when I call a function I wrote, which is composed > of several queries, each of those queries will be executed in its own > transaction? No > Or, will the statement containing the function call be executed in its > own transaction, thereby includin

Re: [SQL] Transactions

2000-07-28 Thread John McKown
On Fri, 28 Jul 2000, Carolyn Lu Wong wrote: > Does postgreSQL support nested transactions? > no.

Re: [SQL] transactions within stored procedures

2000-07-14 Thread Thomas Mack
> >By trial and error I established that a SP wraps everything it does in >one transaction, including anything from stored procedures it calls. > >So here is my question: Is there any way for me to control when >transactions are committed or rolled back within stored procedures? Is When you inv