pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Transactions in PLPGSQL?
2+ messages / 2 participants
[nested] [flat]

* Transactions in PLPGSQL?
@ 2001-02-04 12:06 Ken Corey <zkyar66701p001@sneakemail.com>
  2001-02-07 07:56 ` Re: Transactions in PLPGSQL? Anatoly K. Lasareff <tolik@aaanet.ru>
  0 siblings, 1 reply; 2+ messages in thread

From: Ken Corey @ 2001-02-04 12:06 UTC (permalink / raw)
  To: pgsql-sql

Hi All!

Are the BEGIN/END; seen in a typical PL/PGSQL function a transaction wrapper, 
or do I need to add another BEGIN/END block?

Should I just put a 'rollback' in the function, or do I need to do something 
special?

Thanks!

-Ken



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Transactions in PLPGSQL?
  2001-02-04 12:06 Transactions in PLPGSQL? Ken Corey <zkyar66701p001@sneakemail.com>
@ 2001-02-07 07:56 ` Anatoly K. Lasareff <tolik@aaanet.ru>
  0 siblings, 0 replies; 2+ messages in thread

From: tolik@aaanet.ru @ 2001-02-07 07:56 UTC (permalink / raw)
  To: Ken Corey <zkyar66701p001@sneakemail.com>; +Cc: pgsql-sql

>>>>> "KC" == Ken Corey <zkyar66701p001@sneakemail.com> writes:

 KC> Hi All!
 KC> Are the BEGIN/END; seen in a typical PL/PGSQL function a transaction wrapper, 
 KC> or do I need to add another BEGIN/END block?

No, BEGIN & END in plpgsql function are not transaction control
statemens, but elements of plpgsql language. 

 KC> Should I just put a 'rollback' in the function, or do I need to do something 
 KC> special?

You _cannot_ use any transaction control statemens (commit, rollback)
into plpgsql function. So all the function must be in transaction block.

-- 
Anatoly K. Lasareff                 Email:    tolik@aaanet.ru 
http://tolikus.hq.aaanet.ru:8080    Phone:      (8632)-710071



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-02-07 07:56 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-04 12:06 Transactions in PLPGSQL? Ken Corey <zkyar66701p001@sneakemail.com>
2001-02-07 07:56 ` Anatoly K. Lasareff <tolik@aaanet.ru>

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