Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 707E42E3EDA for ; Wed, 6 Feb 2008 03:24:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 31249-07 for ; Wed, 6 Feb 2008 03:23:59 -0400 (AST) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.236]) by postgresql.org (Postfix) with ESMTP id 4F1642E3EE2 for ; Wed, 6 Feb 2008 03:23:59 -0400 (AST) Received: by qb-out-0506.google.com with SMTP id o12so4195274qba.17 for ; Tue, 05 Feb 2008 23:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=d/loQMjiH7ywgxiqNMHzGswu6EF9Ocvr/uyG3JN6YKY=; b=m6LlTub/X/2vf4amc98kJt/7aS/n3//b1IeXcF8meemL6V/K0q9C+esSnTc2LETOI1qftxtG4D5Veq7jQGtKfkuTRbXraPeNmU7LGC4D2A/RyjH9HAIXXS5B2p296HWYpJdLCFLyMSUrOVtLqNnPGqlwfHoKdJUfY86zVZfZGD4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=MoKeNiwevy3jXLeS0D1YdI+1KQwJGiqH2Z3nRER11Xpzf2koAZy9q1ctXhnKxeEohiYoWROjbJPX40FMNRTzBXvAMPcKKvpQGVHX/6vafPS0Koqwx1PlNWZXrjLxEdrlXvfyFVNtKchmX9yzFaBEIKFjw2StYzvJ61DjVcf+27U= Received: by 10.82.181.7 with SMTP id d7mr17326974buf.4.1202282637773; Tue, 05 Feb 2008 23:23:57 -0800 (PST) Received: by 10.82.113.9 with HTTP; Tue, 5 Feb 2008 23:23:57 -0800 (PST) Message-ID: <36af4bed0802052323l70d7cbb7y10aeafe2467dd3c6@mail.gmail.com> Date: Wed, 6 Feb 2008 12:53:57 +0530 From: "Robins Tharakan" To: "Jyoti Seth" Subject: Re: Multiple postgresql functions in a single transaction Cc: pgsql-sql@postgresql.org In-Reply-To: <36af4bed0802052323i6b842b2ej67ef986fb2532045@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10612_17713501.1202282637764" References: <47A8B788.6010304@gmail.com> <87d4rbm3is.fsf@ttmail.com> <000c01c86888$79a497d0$6cedc770$@com> <36af4bed0802052323i6b842b2ej67ef986fb2532045@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/28 X-Sequence-Number: 30119 ------=_Part_10612_17713501.1202282637764 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > It can be done, but it depends on how you are generating the value in the > first function. > If you sequences though you may have to take care of reverting it > yourself. > > *Robins* > > > ---------- Forwarded message ---------- > From: Jyoti Seth > Date: Feb 6, 2008 11:51 AM > Subject: [SQL] Multiple postgresql functions in a single transaction > To: pgsql-sql@postgresql.org > > > Hi, > > I have two postgresql functions. One function is calling another function > for certain value. I want that these two functions work under single > transaction so that even if the value gets generated in the second > function > and the first function that calls the second function fails. Then the > value > generated in the second function should also roll back. > > Please let me know if we can execute two functions of postgresql in a > single > transaction. > > Thanks, > Jyoti Seth > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > > ------=_Part_10612_17713501.1202282637764 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
It can be done, but it depends on how you are generating the value in the first function.
If you sequences though you may have to take care of reverting it yourself.

Robins


---------- Forwarded message ----------
From: Jyoti Seth <jyotiseth2001@gmail.com>
Date: Feb 6, 2008 11:51 AM
Subject: [SQL] Multiple postgresql functions in a single transaction
To: pgsql-sql@postgresql.org


Hi,

I have two postgresql functions. One function is calling another function
for certain value. I want that these two functions work under single
transaction so that even if the value gets generated in the second function
and the first function that calls the second function fails. Then the value
generated in the second function should also roll back.

Please let me know if we can execute two functions of postgresql in a single
transaction.

Thanks,
Jyoti Seth






---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


------=_Part_10612_17713501.1202282637764--