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 B4E9B5E46CC for ; Mon, 30 Aug 2004 15:34:38 -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 97178-03 for ; Mon, 30 Aug 2004 18:34:33 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.206]) by svr1.postgresql.org (Postfix) with ESMTP id 38A345E46F2 for ; Mon, 30 Aug 2004 15:34:31 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id 73so99477rnk for ; Mon, 30 Aug 2004 11:34:23 -0700 (PDT) Received: by 10.38.76.16 with SMTP id y16mr1086427rna; Mon, 30 Aug 2004 11:34:23 -0700 (PDT) Received: by 10.38.76.30 with HTTP; Mon, 30 Aug 2004 11:34:23 -0700 (PDT) Message-ID: <37d451f704083011341f51cdaa@mail.gmail.com> Date: Mon, 30 Aug 2004 13:34:23 -0500 From: Rosser Schwarz Reply-To: Rosser Schwarz To: Josh Berkus Subject: Re: function fails where individual statements succeed Cc: pgsql-sql@postgresql.org In-Reply-To: <200408301048.49436.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <37d451f7040830101763682930@mail.gmail.com> <200408301048.49436.josh@agliodbs.com> 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/325 X-Sequence-Number: 18822 while you weren't looking, Josh Berkus wrote: > Statement 14 should be that one. Can you test it, and the statements > immediately preccedeing and succeeding it on the command line again? Just running the CREATE INDEXes (after issuing the appropriate DROPs, of course) succeeds. > Also, can you try the whole run without the COPY statement? I'm curious to > see if something in the COPY file is messing things up. Running without the COPY yields a substantively similar error message. Again, this error only happens when the statements are executed in the context of a function; outside, even issued all at once separated by semicolons, the behavior is correct. I was just reminded that there is another difference between this function and the working one: this one is rather more heavily indexed. (None of the compound, conditional indices exist in the earlier, working version.) That might point in the direction of the error, though it doesn't explain why it only fails in a function; I'll do some digging. /rls -- :wq