From: Bruce Momjian <bruce@momjian.us>
To: Michael Fuhr <mike@fuhr.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Wittel <gwittel@proofpoint.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
Date: Sat, 17 Feb 2007 20:47:57 -0500 (EST)
Message-ID: <200702180147.l1I1lv207144@momjian.us> (raw)
In-Reply-To: <20070208155504.GA78152@winnie.fuhr.org>
Michael Fuhr wrote:
> 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?
Done, and attached.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachments:/rtmp/diff (text/x-diff, 997B) download
Index: doc/src/sgml/spi.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v
retrieving revision 1.52
diff -c -c -r1.52 spi.sgml
*** doc/src/sgml/spi.sgml 1 Feb 2007 19:10:24 -0000 1.52
--- doc/src/sgml/spi.sgml 18 Feb 2007 01:45:45 -0000
***************
*** 321,327 ****
</para>
<para>
! You can pass multiple commands in one string.
<function>SPI_execute</function> returns the
result for the command executed last. The <parameter>count</parameter>
limit applies to each command separately, but it is not applied to
--- 321,328 ----
</para>
<para>
! You can pass multiple commands in one string, but later commands cannot
! depend on the creation of objects earlier in the string.
<function>SPI_execute</function> returns the
result for the command executed last. The <parameter>count</parameter>
limit applies to each command separately, but it is not applied to
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bruce@momjian.us, mike@fuhr.org, tgl@sss.pgh.pa.us, gwittel@proofpoint.com
Subject: Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
In-Reply-To: <200702180147.l1I1lv207144@momjian.us>
References: <20070208155504.GA78152@winnie.fuhr.org> <200702180147.l1I1lv207144@momjian.us>
* 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