pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sébastien HEITZMANN <2le@2le.net>
To: Allan Kamau <hugebirdwings@yahoo.com>
To: Anatoly K. Lasareff <tolik@aaanet.ru>
Cc: pgsql-admin@postgresql.org
Subject: Re: Transactions and Locks writing in PLPGSQL
Date: Thu, 14 Jun 2001 09:52:58 +0200
Message-ID: <007501c0f4a7$11990290$473e05c0@CALISTO> (raw)
References: <20010613093932.22687.qmail@web10808.mail.yahoo.com>
	<86elsnfw5h.fsf@tolikus.hq.aaanet.ru>

And what happen when the function call an other function. Does this action
also be rolled back if the first fail ?

SEB

----- Original Message -----
From: "Anatoly K. Lasareff" <tolik@aaanet.ru>
To: "Allan Kamau" <hugebirdwings@yahoo.com>
Cc: <pgsql-admin@postgresql.org>
Sent: Thursday, June 14, 2001 7:49 AM
Subject: Re: [ADMIN] Transactions and Locks writing in PLPGSQL


> >>>>> "AK" == Allan Kamau <hugebirdwings@yahoo.com> writes:
>
>  AK> Hi all,
>  AK> How do I write transaction statements like 'BEGIN
>  AK> WORK'... in PLPGSQL.
>  AK> Also how do I write lock statements in the same.
>  AK> Thank you in advance.
>
>  AK> Allan Kamau
>
> There is no possibility for this. See (from manual):
>
> (3) You also cannot have transactions in PL/pgSQL procedures. The
> entire function (and other functions called from
>     therein) is executed in a transaction and PostgreSQL rolls back
> the results if something goes wrong. Therefore
>     only one BEGIN statement is allowed.
>
> --
> Anatoly K. Lasareff                 Email:    tolik@aaanet.ru
>                              http://tolikus.hq.aaanet.ru:8080
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




view thread (3+ messages)

Message-ID: <007501c0f4a7$11990290$473e05c0@CALISTO>
Permalink:  ../007501c0f4a7$11990290$473e05c0@CALISTO/
Also on:    postgresql.org/message-id/007501c0f4a7$11990290$473e05c0@CALISTO

 · 

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-admin@postgresql.org
  Cc: 2le@2le.net, hugebirdwings@yahoo.com, tolik@aaanet.ru
  Subject: Re: Transactions and Locks writing in PLPGSQL
  In-Reply-To: <007501c0f4a7$11990290$473e05c0@CALISTO>
  References: <20010613093932.22687.qmail@web10808.mail.yahoo.com> <86elsnfw5h.fsf@tolikus.hq.aaanet.ru> <007501c0f4a7$11990290$473e05c0@CALISTO>

* 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