vacuumlo fails in the presence of a index on expression - demo sql included

Поиск
Список
Период
Сортировка
От Frank van Vugt
Тема vacuumlo fails in the presence of a index on expression - demo sql included
Дата
Msg-id 200408192138.56078.ftm.van.vugt@foxi.nl
обсуждение исходный текст
Ответы Re: vacuumlo fails in the presence of a index on expression - demo sql included  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
L.S.

I don't expect that this is the intended behaviour:

db=# SELECT version();
                               version
---------------------------------------------------------------------
 PostgreSQL 7.4.3 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66


If you run these commands:

CREATE TABLE "level" ("id" int primary key, "abbreviation" text);
INSERT INTO "level" VALUES (1, 'ONE');
INSERT INTO "level" VALUES (2, 'TWO');
INSERT INTO "level" VALUES (3, 'THREE');

CREATE TABLE "base" ("id" int primary key, "sub_id" int, "level_id" int
references level(id), "image" oid);

CREATE FUNCTION get_level(varchar) RETURNS int LANGUAGE 'sql' IMMUTABLE STRICT
SECURITY INVOKER AS 'SELECT id FROM level WHERE abbreviation = $1';

CREATE INDEX base_idx ON base(sub_id, id) WHERE level_id = get_level('THREE');

Then vacuumlo will output:

# /usr/local/pgsql/bin/vacuumlo -v -n -U postgres db
Connected to db
Test run: no large objects will be removed!
Checking image in public.base
Failed to check image in table public.base:
ERROR:  relation "level" does not exist
CONTEXT:  SQL function "get_level" during startup


Omitting the index creation makes vacuumlo finish succesfully.





--
Best,




Frank.

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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: BUG #1222: database owner should have implicit control
Следующее
От: Tom Lane
Дата:
Сообщение: Re: vacuumlo fails in the presence of a index on expression - demo sql included