pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tolik@aaanet.ru
To: Ken Corey <zkyar66701p001@sneakemail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Transactions in PLPGSQL?
Date: 07 Feb 2001 10:56:09 +0300
Message-ID: <86pugvudt2.fsf@tolikus.hq.aaanet.ru> (raw)
References: <01020412065705.18716@kenlinux.bithub.org>

>>>>> "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



view thread (2+ messages)

Message-ID: <86pugvudt2.fsf@tolikus.hq.aaanet.ru>
Permalink:  ../86pugvudt2.fsf@tolikus.hq.aaanet.ru/
Also on:    postgresql.org/message-id/86pugvudt2.fsf@tolikus.hq.aaanet.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tolik@aaanet.ru, zkyar66701p001@sneakemail.com
  Subject: Re: Transactions in PLPGSQL?
  In-Reply-To: <86pugvudt2.fsf@tolikus.hq.aaanet.ru>
  References: <01020412065705.18716@kenlinux.bithub.org> <86pugvudt2.fsf@tolikus.hq.aaanet.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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