Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 52A0D2E3F06 for ; Wed, 6 Feb 2008 03:37:53 -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 35367-05-2 for ; Wed, 6 Feb 2008 03:37:49 -0400 (AST) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.227]) by postgresql.org (Postfix) with ESMTP id 8531A2E3F49 for ; Wed, 6 Feb 2008 03:37:49 -0400 (AST) Received: by qb-out-0506.google.com with SMTP id o12so4212349qba.17 for ; Tue, 05 Feb 2008 23:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:references:in-reply-to:subject:date:message-id:mime-version:content-type:x-mailer:thread-index:content-language; bh=OMAzKn3pKB70zaxUV1S1Ahq1iFzNYryJ2Gzn0Ve53Dk=; b=qKN5+QcwhuyyaJ8VfML8IqFY6d79dOc7wnWKHmbFUCs8mu81qjoKyHBJVAwS1jJTDnZFcTRysHNJ/D6W3YwieoMzqtn0Kex3ugKB7a+NL5skHj0T6uwsRe5I+SCCetolfon7O65I2msmGvACm0qR2HEIK8RQvmDeabmOEM2aZHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:references:in-reply-to:subject:date:message-id:mime-version:content-type:x-mailer:thread-index:content-language; b=mHWxdBSkt8Ek+Dp3FvySgAJc8g01bvBrGSzF2xQW2vAXZwn+GF1zNhXO4iaKxDhfBfoZmakk8+Hk9ohN4+fQ5loHKTHVTrjnUccc2W2sht/Hpf0MbLpl5ZFMH2MTG8aRHhP0dXbeY9B5TDXb8aU9mf3KzWLH1J3oUl5D+MEfvS4= Received: by 10.141.107.13 with SMTP id j13mr6356499rvm.276.1202283467974; Tue, 05 Feb 2008 23:37:47 -0800 (PST) Received: from BITDLLT03 ( [122.163.226.134]) by mx.google.com with ESMTPS id 2sm10147744rvi.32.2008.02.05.23.37.44 (version=SSLv3 cipher=RC4-MD5); Tue, 05 Feb 2008 23:37:46 -0800 (PST) From: "Jyoti Seth" To: "'Robins Tharakan'" Cc: References: <47A8B788.6010304@gmail.com> <87d4rbm3is.fsf@ttmail.com> <000c01c86888$79a497d0$6cedc770$@com> <36af4bed0802052323i6b842b2ej67ef986fb2532045@mail.gmail.com> <36af4bed0802052323l70d7cbb7y10aeafe2467dd3c6@mail.gmail.com> In-Reply-To: <36af4bed0802052323l70d7cbb7y10aeafe2467dd3c6@mail.gmail.com> Subject: Re: Multiple postgresql functions in a single transaction Date: Wed, 6 Feb 2008 13:07:23 +0530 Message-ID: <001301c86893$200ccc50$602664f0$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0014_01C868C1.39C50850" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AchokTzRWlL29oaURXe0EzSzMd9hdAAAZG5Q Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/29 X-Sequence-Number: 30120 This is a multipart message in MIME format. ------=_NextPart_000_0014_01C868C1.39C50850 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Thanks. I am not using sequences. I tried an example and it worked. From: Robins Tharakan [mailto:tharakan@gmail.com] Sent: Wednesday, February 06, 2008 12:54 PM To: Jyoti Seth Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Multiple postgresql functions in a single transaction 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 ------=_NextPart_000_0014_01C868C1.39C50850 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Thanks. I am not using sequences. I tried an example and = it worked.

 

From:= Robins = Tharakan [mailto:tharakan@gmail.com]
Sent: Wednesday, February 06, 2008 12:54 PM
To: Jyoti Seth
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Multiple postgresql functions in a single = transaction

 

 

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

 

 

------=_NextPart_000_0014_01C868C1.39C50850--