| From: | Kretschmer Andreas <andreas_kretschmer(at)despammed(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Transaction within plpgsql |
| Date: | 2005-10-01 05:31:20 |
| Message-ID: | 20051001053120.GA1567@kaufbach.delug.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> schrieb:
> Walker, Jed S wrote:
> > I am coding a procedure to purge data from a table. I want to commit the
> > data I'm purging at intervals (for example, every 1000 rows). The
> > problem I'm encountering is that when I have
> >
> > begin transaction;
> > commit;
> >
> > statements in my plpgsql function it doesn't compile.
> >
> > How can you explicitly create transactions within a plpgsql function?
>
> No, you can not, sorry, but you might as well just do the entire thing
> in the single transaction of the function.
Hi Bruce,
I think, he can use savepoints within the procedure.
http://www.postgresql.org/docs/8.0/static/sql-savepoint.html
But, the whole procedure is one transaction.
I'm right?
Regards, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
| From | Date | Subject | |
|---|---|---|---|
| Next Message | 2005-10-01 07:52:24 | Postgresql 8.0.3 installation problem on WinXP SP2 | |
| Previous Message | Bruce Momjian | 2005-09-30 21:11:56 | Re: Transaction within plpgsql |