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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression
Дата
Msg-id 200702180147.l1I1lv207144@momjian.us
обсуждение исходный текст
Ответ на Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-sql
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. +
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

В списке pgsql-sql по дате отправления:

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: sub-limiting a query
Следующее
От: "Karthikeyan Sundaram"
Дата:
Сообщение: How to analyse the indexes in postgres?