Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression - Mailing list pgsql-sql

From Tom Lane
Subject Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
Date
Msg-id 8487.1170950356@sss.pgh.pa.us
Whole thread Raw
In response to Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
Michael Fuhr <mike@fuhr.org> writes:
> 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:

Well, the point here is that there's one pass of parsing and one of
execution, and you won't get far if the parsing pass requires an earlier
command to have already been executed.  So maybe the appropriate warning
is something about not using interdependent DDL commands.  Feel free to
draft up a docs patch.
        regards, tom lane


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Seeking quick way to clone a row, but give it a new pk.