BUG #2836: SPI_execute_plan failed on pl/pgsql function that worked on 8.1

Поиск
Список
Период
Сортировка
От Albert Cervera i Areny
Тема BUG #2836: SPI_execute_plan failed on pl/pgsql function that worked on 8.1
Дата
Msg-id 200612180949.kBI9nTiH093018@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2836: SPI_execute_plan failed on pl/pgsql function that worked on 8.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2836
Logged by:          Albert Cervera i Areny
Email address:      albert@sedifa.com
PostgreSQL version: 8.2
Operating system:   Debian GNU/Linux
Description:        SPI_execute_plan failed on pl/pgsql function that worked
on 8.1
Details:

I get the following error on a function that worked correctly on 8.1:

ERROR:  SPI_execute_plan failed executing query "UPDATE
pg_catalog.pg_settings SET setting= $1  WHERE name='search_path'":
Unrecognized SPI code 0
CONTEXT:  PL/pgSQL function "ventas_por_grupo_conjunta_tmp" line 23 at SQL
statement
SQL function "ventas_por_grupo_conjunta" statement 1

The function tries to reestablish the search_path with the following UPDATE
command:

$body$
SELECT setting INTO path FROM pg_catalog.pg_settings WHERE
name='search_path';

...here the rest of the function...

UPDATE pg_catalog.pg_settings SET setting=path WHERE name='search_path
$body$

I've been able to work around this by using:

EXECUTE 'UPDATE pg_catalog.pg_settings SET setting=''' || path || ''' WHERE
name=''search_path''';

instead.

Hope this helps in finding out the problem. I don't think the behaviour is
intended.

Please, contact if you want me to test any patches.

Thanks!

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

Предыдущее
От: "William ZHANG"
Дата:
Сообщение: BUG #2835: Table inheritance and statement level trigger.
Следующее
От: "canli"
Дата:
Сообщение: BUG #2837: i received ERROR: failed to build any 7-way joins