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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Greg Wittel <gwittel(at)proofpoint(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
Date: 2007-02-08 15:59:16
Message-ID: 8487.1170950356@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Michael Fuhr <mike(at)fuhr(dot)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

In response to

Browse pgsql-sql by date

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