Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 64FD99FB2B2 for ; Thu, 8 Feb 2007 11:55:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 03732-02 for ; Thu, 8 Feb 2007 11:55:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 2402B9FB2FE for ; Thu, 8 Feb 2007 11:55:09 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l18Ft5KR007610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Feb 2007 08:55:07 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l18Ft4kX078240; Thu, 8 Feb 2007 08:55:04 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l18Ft4Nf078239; Thu, 8 Feb 2007 08:55:04 -0700 (MST) (envelope-from mfuhr) Date: Thu, 8 Feb 2007 08:55:04 -0700 From: Michael Fuhr To: Tom Lane Cc: Greg Wittel , pgsql-sql@postgresql.org Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression Message-ID: <20070208155504.GA78152@winnie.fuhr.org> References: <45CA5601.1090007@proofpoint.com> <20070208112331.GA75899@winnie.fuhr.org> <20070208141433.GD24069@alvh.no-ip.org> <20070208150746.GA77230@winnie.fuhr.org> <8064.1170948745@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8064.1170948745@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/90 X-Sequence-Number: 27424 On Thu, Feb 08, 2007 at 10:32:25AM -0500, Tom Lane wrote: > My advice is not to try to execute multiple commands in the same EXECUTE > string --- if we were going to do anything to "fix" this, I think it > would be along the lines of enforcing that advice. Trying to make the > world safe for it doesn't sound productive. The SPI_execute() documentation does mention that multiple commands are allowed: http://www.postgresql.org/docs/8.2/interactive/spi-spi-execute.html "You may pass multiple commands in one string. SPI_execute returns the result for the command executed last. The count limit applies to each command separately, but it is not applied to hidden commands generated by rules. "When read_only is false, SPI_execute increments the command counter and computes a new snapshot before executing each command in the string." Should that documentation be modified? -- Michael Fuhr