pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedtransactions and cursors......
3+ messages / 3 participants
[nested] [flat]
* transactions and cursors......
@ 2002-02-27 17:30 Chris Pesko <cpesko@organic.com>
2002-02-27 20:14 ` Re: transactions and cursors...... Dan Langille <dan@langille.org>
2002-02-27 22:03 ` Re: transactions and cursors...... Arguile <arguile@lucentstudios.com>
0 siblings, 2 replies; 3+ messages in thread
From: Chris Pesko @ 2002-02-27 17:30 UTC (permalink / raw)
To: pgsql-admin
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?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: transactions and cursors......
2002-02-27 17:30 transactions and cursors...... Chris Pesko <cpesko@organic.com>
@ 2002-02-27 20:14 ` Dan Langille <dan@langille.org>
1 sibling, 0 replies; 3+ messages in thread
From: Dan Langille @ 2002-02-27 20:14 UTC (permalink / raw)
To: Chris Pesko <cpesko@organic.com>; +Cc: pgsql-admin
On 27 Feb 2002 at 9:30, Chris Pesko wrote:
> Can I put transactions and cursors into functions?
No.
> 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?
AFAIK, yes.
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: transactions and cursors......
2002-02-27 17:30 transactions and cursors...... Chris Pesko <cpesko@organic.com>
@ 2002-02-27 22:03 ` Arguile <arguile@lucentstudios.com>
1 sibling, 0 replies; 3+ messages in thread
From: Arguile @ 2002-02-27 22:03 UTC (permalink / raw)
To: Chris Pesko <cpesko@organic.com>; 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-02-27 22:03 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-27 17:30 transactions and cursors...... Chris Pesko <cpesko@organic.com>
2002-02-27 20:14 ` Dan Langille <dan@langille.org>
2002-02-27 22:03 ` Arguile <arguile@lucentstudios.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox