Re: [ADMIN] commit within function

2009-07-16 Thread Scott Marlowe
On Thu, Jul 16, 2009 at 11:30 AM, Anj Adu wrote: > I need an explicit commit...i.e i need func B's results to be > available to other transactions when I enter func C > > So...what you are saying is..in Func c > > BEGIN >    simulate error > EXCEPTION >    WHEN condition [ OR condition ... ] THEN >

Re: [ADMIN] commit within function

2009-07-16 Thread Scott Marlowe
Oops, I just noticed you took us off list. Don't do that, others might have better ideas than me on this. On Thu, Jul 16, 2009 at 7:59 AM, Anj Adu wrote: > 1. exec Func A >   2. call Func B >   3. Call Func C > > Func A is the outermost control function. > Function B inserts into a set of tables

Re: [ADMIN] commit within function

2009-07-15 Thread Scott Marlowe
Oh wait, not both things. I'm saying to use error trapping first to accomplish this. OR if that doesn't work, then look at savepoints. On Wed, Jul 15, 2009 at 7:36 PM, Anj Adu wrote: > So..are you implying that we fake an error to force the commit on a > savepoint..and just ignore the error and

Re: [ADMIN] commit within function

2009-07-15 Thread Scott Marlowe
Hard to say, since you really haven't told us what you're doing in your transaction. Often the standard error trapping is the simplest way to do that. On Wed, Jul 15, 2009 at 7:36 PM, Anj Adu wrote: > So..are you implying that we fake an error to force the commit on a > savepoint..and just ignore

Re: [ADMIN] commit within function

2009-07-15 Thread Anj Adu
So..are you implying that we fake an error to force the commit on a savepoint..and just ignore the error and move on..if that works..i guess it will work for me. On Wed, Jul 15, 2009 at 5:49 PM, Scott Marlowe wrote: > So, did this not work either? > > > http://www.postgresql.org/docs/8.4/static/p

Re: [ADMIN] commit within function

2009-07-15 Thread Scott Marlowe
On Wed, Jul 15, 2009 at 3:58 PM, Anj Adu wrote: > Is there a way to issue a commit within a function and continue processing? > I know this is not possible in 8.1.. > > We have long running function calls...parts of which are independent of each > other. The independent functions are called within

[ADMIN] commit within function

2009-07-15 Thread Anj Adu
Is there a way to issue a commit within a function and continue processing? I know this is not possible in 8.1.. We have long running function calls...parts of which are independent of each other. The independent functions are called within a "main" outer function. We would like to commit the data