Received: from mail.evhr.net (mail.evhr.net [212.94.192.3]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5E7tKE60644 for ; Thu, 14 Jun 2001 03:55:20 -0400 (EDT) (envelope-from 2le@2le.net) Received: from CALISTO (ip-161-78.evhr.net [213.169.161.78]) by mail.evhr.net (8.9.3/8.9.3) with SMTP id JAA26506; Thu, 14 Jun 2001 09:02:06 +0200 Message-ID: <007501c0f4a7$11990290$473e05c0@CALISTO> Reply-To: =?iso-8859-1?Q?S=E9bastien_HEITZMANN?= <2le@2le.net> From: =?iso-8859-1?Q?S=E9bastien_HEITZMANN?= <2le@2le.net> To: "Allan Kamau" , "Anatoly K. Lasareff" Cc: References: <20010613093932.22687.qmail@web10808.mail.yahoo.com> <86elsnfw5h.fsf@tolikus.hq.aaanet.ru> Subject: Re: Transactions and Locks writing in PLPGSQL Date: Thu, 14 Jun 2001 09:52:58 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200106/85 X-Sequence-Number: 1642 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" To: "Allan Kamau" Cc: Sent: Thursday, June 14, 2001 7:49 AM Subject: Re: [ADMIN] Transactions and Locks writing in PLPGSQL > >>>>> "AK" == Allan Kamau 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 >