Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F33AE2E01F3 for ; Wed, 6 Feb 2008 02:21:36 -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 02948-09 for ; Wed, 6 Feb 2008 02:21:31 -0400 (AST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by postgresql.org (Postfix) with ESMTP id 7063D2E0168 for ; Wed, 6 Feb 2008 02:21:31 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d37so4913271pye.29 for ; Tue, 05 Feb 2008 22:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:references:in-reply-to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:content-language:x-cr-hashedpuzzle:x-cr-puzzleid; bh=1x26uDbwGJJFATkFyrKveOwJhUALAck9ISl9tJOW6ug=; b=Cm/hpGvwFtPUIKPm4dDMljvq5GMfi/2Kmw8AK5NC3UzaBMJ0fZXwC8mL5cVEquLx5YN9qYgOAZdJn3jtSUf53yXa2o3xgYxMpmIe6DgGzXWwwKgsrzqvIDh0mgm5GDr+jdcF8MZxZM4XstUOGYkedR+SBP2n91JvmRLi4dADC+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:content-language:x-cr-hashedpuzzle:x-cr-puzzleid; b=vbwI+x1f964J5n0HqI2p6K2HrJ0qBlDXrSP9jrUlNNKwFw4oxXFdC7UI3KwbpToeuY2yuwP5T/j1EzyjlY7kK5c3r/YOUpIvMpxGC1bhlYnOxdeS61QbREom84K9JbwTsd6dXOcccexFjvt6fGd9Nxslcqdhz2dDSaSNE6LSYZI= Received: by 10.141.13.16 with SMTP id q16mr6333133rvi.99.1202278889952; Tue, 05 Feb 2008 22:21:29 -0800 (PST) Received: from BITDLLT03 ( [122.163.226.134]) by mx.google.com with ESMTPS id l32sm6987024rvb.2.2008.02.05.22.21.26 (version=SSLv3 cipher=RC4-MD5); Tue, 05 Feb 2008 22:21:28 -0800 (PST) From: "Jyoti Seth" To: References: <47A8B788.6010304@gmail.com> <87d4rbm3is.fsf@ttmail.com> In-Reply-To: <87d4rbm3is.fsf@ttmail.com> Subject: Multiple postgresql functions in a single transaction Date: Wed, 6 Feb 2008 11:51:10 +0530 Message-ID: <000c01c86888$79a497d0$6cedc770$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AchoQClKmgDhfgdHTlGgJmIvjcZOkQARlwag Content-Language: en-us x-cr-hashedpuzzle: drA= BMfI BnOF BowC Dw3V FrZs FzF6 F2Xz GoY6 HuK9 H1ew IIPk IsjU KhLU K6Ei LEp+; 1; cABnAHMAcQBsAC0AcwBxAGwAQABwAG8AcwB0AGcAcgBlAHMAcQBsAC4AbwByAGcA; Sosha1_v1; 7; {47833E92-1E78-4653-B371-7E3204D36B2A}; agB5AG8AdABpAHMAZQB0AGgAMgAwADAAMQBAAGcAbQBhAGkAbAAuAGMAbwBtAA==; Wed, 06 Feb 2008 06:21:04 GMT; TQB1AGwAdABpAHAAbABlACAAcABvAHMAdABnAHIAZQBzAHEAbAAgAGYAdQBuAGMAdABpAG8AbgBzACAAaQBuACAAYQAgAHMAaQBuAGcAbABlACAAdAByAGEAbgBzAGEAYwB0AGkAbwBuAA== x-cr-puzzleid: {47833E92-1E78-4653-B371-7E3204D36B2A} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/27 X-Sequence-Number: 30118 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