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

[SQL] transactions and ecpg

2012-09-22 Thread 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 still no begin statements in the code, only co

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.

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

[SQL] transactions in functions, possible bug or what I'm doing wrong?

2004-11-19 Thread Riccardo G. Facchini
Hi All, PostgreSQL 7.4.5 assume this script: --- create table test_table ( id serial, test_value text ) without oids; insert into test_table (test_value) values ('A'); insert into test_table (test_value) values ('B'); insert into test_table (test_value) values ('C'); insert into test_table

[SQL] Transactions ID

2003-09-05 Thread Yaroslav Ulyanov
Hello, Michael.   You may prompt me, what get the identifier to transactions?   Best regards,Yaroslav Ulyanov[EMAIL PROTECTED]

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

[SQL] transactions

2003-07-29 Thread Viorel Dragomir
Is there any known issues regarding transactions. I got something like:   begin transaction select function1() select into v1 function2() if v1='ok' then commit else rollback end if   To notice that both functions have about 100 lines of code. And both functions uses the same tables but in d

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

[SQL] Transactions in PLPGSQL?

2001-02-06 Thread Ken Corey
Hi All! Are the BEGIN/END; seen in a typical PL/PGSQL function a transaction wrapper, or do I need to add another BEGIN/END block? Should I just put a 'rollback' in the function, or do I need to do something special? Thanks! -Ken

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

[SQL] transactions surrounding extension functions

2000-09-28 Thread Forest Wilkinson
According to the postgres 7 docs: >By default, Postgres executes transactions in unchained mode (also >known as “autocommit” in other database systems). In other words, each >user statement is executed in its own transaction and a commit is >implicitly performed at the end of the statement (if

Re: [SQL] Transactions

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

[SQL] Transactions

2000-07-28 Thread Carolyn Lu Wong
Does postgreSQL support nested transactions?

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

[SQL] transactions within stored procedures

2000-07-14 Thread Nathan Young
Hi. Please correct me if this is off topic for the group. On looking through the available postgres mailing lists, this seemed the most appropriate for my question. Transactions are important to my application. I was scripting in perl with autocommit turned off, issuing commits when appropriat