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 023903A9F0B for ; Tue, 21 Dec 2004 17:33:04 +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 90689-05 for ; Tue, 21 Dec 2004 17:32:56 +0000 (GMT) Received: from fed1rmmtao07.cox.net (fed1rmmtao07.cox.net [68.230.241.32]) by svr1.postgresql.org (Postfix) with ESMTP id 4800B3A698A for ; Tue, 21 Dec 2004 17:32:53 +0000 (GMT) Received: from [192.168.2.210] (really [68.3.38.226]) by fed1rmmtao07.cox.net (InterMail vM.6.01.04.00 201-2131-117-20041022) with ESMTP id <20041221173252.DORB21886.fed1rmmtao07.cox.net@[192.168.2.210]> for ; Tue, 21 Dec 2004 12:32:52 -0500 Message-ID: <41C85E8A.20906@illusions.com> Date: Tue, 21 Dec 2004 10:34:02 -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 in 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/147 X-Sequence-Number: 19767 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