From: | sam <sam(dot)mahindrakar(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trouble with Savepoints in postgres |
Date: | 2008-03-12 19:31:21 |
Message-ID: | ecc180e7-9bb1-4277-b8b2-ee0657800096@u72g2000hsf.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mar 12, 8:11 am, alvhe(dot)(dot)(dot)(at)alvh(dot)no-ip(dot)org (Alvaro Herrera) wrote:
> Please always ensure that the list is copied on replies (use "Reply to
> all") so that other people can help you.
>
> sam escribió:
>
> > On Mar 11, 5:39 pm, alvhe(dot)(dot)(dot)(at)commandprompt(dot)com (Alvaro Herrera) wrote:
> > > sam escribió:
>
> > > > Iam not able to understand if this is a version problem or the way iam
> > > > using savepoints is wrong.Please advice.
>
> > > It is. You cannot use savepoints in PL/pgSQL functions (or any function
> > > for that matter). You can use EXCEPTION clauses instead.
> > Then u please tell me how save points can be used...........The
> > program iam working on is throwing an 'LIMIT EXCEEDED' error so iam
> > trying to commit data so that a total rollback does not occur.Like
> > commiting data after every 1000 transactions. I figured that
> > savepoints would be the solution.
>
> No, savepoints will not help you there. No matter what you do, you
> cannot commit in the middle of a function.
>
> What's the limit being exceeded? Perhaps you can solve your problem
> some other way.
>
> --
> Alvaro Herrera Developer,http://www.PostgreSQL.org/
> "Escucha y olvidarás; ve y recordarás; haz y entenderás" (Confucio)
>
> --
> Sent via pgsql-general mailing list (pgsql-gene(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general
Also can u please tell mewhy i get the error...ERROR: SPI_execute_plan
failed executing query "PREPARE TRANSACTION 'foo'":
SPI_ERROR_TRANSACTION
I get this error when i also use COMMIT, ROLLBACK.....does this mean a
patch is missing ?
Thanks
Sam
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-03-12 19:32:56 | Re: Function Returning SETOF RECORD: Trouble With Char Type |
Previous Message | Tom Lane | 2008-03-12 19:26:00 | Re: postgre vs MySQL |