Received: from aaanet.ru (pa.aaanet.ru [213.59.98.223]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5E5nkE77333 for ; Thu, 14 Jun 2001 01:49:46 -0400 (EDT) (envelope-from tolik@tolikus.hq.aaanet.ru) Received: from [213.59.113.17] (helo=tolikus.hq.aaanet.ru) by aaanet.ru with esmtp (Exim 3.16 #1) id 15AQ0m-0005wO-00; Thu, 14 Jun 2001 09:49:44 +0400 Received: (from tolik@localhost) by tolikus.hq.aaanet.ru (8.9.3/8.9.3) id JAA62260; Thu, 14 Jun 2001 09:49:46 +0400 (MSD) (envelope-from tolik) To: Allan Kamau Cc: pgsql-admin@postgresql.org Subject: Re: Transactions and Locks writing in PLPGSQL References: <20010613093932.22687.qmail@web10808.mail.yahoo.com> Mime-Version: 1.0 (generated by tm-edit 1.5) Content-Type: text/plain; charset=US-ASCII From: tolik@aaanet.ru (Anatoly K. Lasareff) Date: 14 Jun 2001 09:49:46 +0400 In-Reply-To: Allan Kamau's message of "Wed, 13 Jun 2001 02:39:32 -0700 (PDT)" Message-ID: <86elsnfw5h.fsf@tolikus.hq.aaanet.ru> Lines: 21 X-Mailer: Gnus v5.6.45/XEmacs 21.1 - "Canyonlands" X-Archive-Number: 200106/84 X-Sequence-Number: 1641 >>>>> "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