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 4A6525E46EC for ; Mon, 30 Aug 2004 17:40:35 -0300 (ADT) 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 34634-06 for ; Mon, 30 Aug 2004 20:40:29 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by svr1.postgresql.org (Postfix) with ESMTP id 616625E46CD for ; Mon, 30 Aug 2004 17:40:27 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id 73so162633rnl for ; Mon, 30 Aug 2004 13:40:24 -0700 (PDT) Received: by 10.38.6.75 with SMTP id 75mr1137575rnf; Mon, 30 Aug 2004 13:40:23 -0700 (PDT) Received: by 10.38.76.30 with HTTP; Mon, 30 Aug 2004 13:40:23 -0700 (PDT) Message-ID: <37d451f704083013401926a341@mail.gmail.com> Date: Mon, 30 Aug 2004 15:40:23 -0500 From: Rosser Schwarz Reply-To: Rosser Schwarz To: Tom Lane Subject: Re: function fails where individual statements succeed Cc: pgsql-sql@postgresql.org In-Reply-To: <11133.1093897977@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <37d451f7040830101763682930@mail.gmail.com> <11133.1093897977@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/327 X-Sequence-Number: 18824 while you weren't looking, Tom Lane wrote: [...] > If you want to encapsulate this set of operations in a function, I'd > suggest using plpgsql and being careful to EXECUTE each query rather > than letting plpgsql try to cache a plan for it. We've opted to simply script issuing the statements serially, rather than as a function for this one. Your explanation makes sense, Tom, though I'm curious why it works in our long-running case (beyond the issue of fewer indices there). Given that, I'm going to move that we adopt the serial issuance approach for that process, to save off the error eventually cropping up there, too. Dankeschoen, /rls -- :wq