Re: transactions and cursors......

From: "Arguile" <arguile(at)lucentstudios(dot)com>
To: "Chris Pesko" <cpesko(at)organic(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: transactions and cursors......
Date: 2002-02-27 22:03:09
Message-ID: LLENKEMIODLDJNHBEFBOCEFLEEAA.arguile@lucentstudios.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Chris Pesko writes:
> Can I put transactions and cursors into functions? As soon as I
> put BEGIN;
> and COMMIT; wrapping an insert statement within a function, I get
> errors. Do these programs need to reside outside of the database?

Pg doesn't supported nested transactions or save points (yet). So you can't
have transactional control inside plpgsql functions.

Cursors will depend on what version you're running. See chapter 23.7 of the
7.2 documentation for using cursors inside functions.

http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/plpgsql-cursors.
html

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2002-02-27 22:14:33 Re: optimizer
Previous Message Zhang, Anna 2002-02-27 21:01:19 optimizer