X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E0E7A3AA20E for ; Tue, 21 Dec 2004 17:20:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85877-10 for ; Tue, 21 Dec 2004 17:20:43 +0000 (GMT) Received: from fed1rmmtao10.cox.net (fed1rmmtao10.cox.net [68.230.241.29]) by svr1.postgresql.org (Postfix) with ESMTP id C33EB3A5AAF for ; Tue, 21 Dec 2004 17:20:42 +0000 (GMT) Received: from [192.168.2.210] (really [68.3.38.226]) by fed1rmmtao10.cox.net (InterMail vM.6.01.04.00 201-2131-117-20041022) with ESMTP id <20041221172038.NRIC7026.fed1rmmtao10.cox.net@[192.168.2.210]> for ; Tue, 21 Dec 2004 12:20:38 -0500 Message-ID: <41C85BAF.6000305@illusions.com> Date: Tue, 21 Dec 2004 10:21:51 -0700 From: Dennis Sacks User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: commit inside plpgsql function Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/151 X-Sequence-Number: 19771 Hi, I am converting oracle stored procedures to plpgsql. There are several of the oracle procedures where a parameter vCommit is passed into the procedure and: if vCommit = 1 then commit; do_something_commit(vdate); else do_something(vdate); end if; does this make sense in plpgsql? Does it make sense to do a commit in plpgsql? Thanks, Dennis