From: Michael Fuhr <mike@fuhr.org>
To: Greg Wittel <gwittel@proofpoint.com>
To: pgsql-sql@postgresql.org
Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
Date: Thu, 8 Feb 2007 08:07:47 -0700
Message-ID: <20070208150746.GA77230@winnie.fuhr.org> (raw)
In-Reply-To: <20070208141433.GD24069@alvh.no-ip.org>
References: <45CA5601.1090007@proofpoint.com>
<20070208112331.GA75899@winnie.fuhr.org>
<20070208141433.GD24069@alvh.no-ip.org>
On Thu, Feb 08, 2007 at 11:14:33AM -0300, Alvaro Herrera wrote:
> Michael Fuhr wrote:
> > The error appears to happen for anything that uses SPI. A C function
> > that executes the following fails with the same error:
> >
> > SPI_exec("CREATE TABLE foo (t text); CREATE INDEX foo_idx ON foo (lower(t))", 0);
>
> Hmm, are we short of a CommandCounterIncrement in the middle of both
> commands? Does the same error show up if you do
>
> SPI_exec("CREATE TABLE foo (t text);", 0);
> SPI_exec("CREATE INDEX foo_idx ON foo (lower(t))", 0);
Using separate calls to SPI_exec() works. Using a single call to
SPI_exec() works if the index is on (t) instead of (lower(t)):
SPI_exec("CREATE TABLE foo (t text); CREATE INDEX foo_idx ON foo (t)", 0);
--
Michael Fuhr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mike@fuhr.org, gwittel@proofpoint.com
Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
In-Reply-To: <20070208150746.GA77230@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox