'pg_class_aclcheck: relation not found' with temp tables in plpgsql

Поиск
Список
Период
Сортировка
От Reece Hart
Тема 'pg_class_aclcheck: relation not found' with temp tables in plpgsql
Дата
Msg-id 1065832530.12660.261.camel@tallac
обсуждение исходный текст
Список pgsql-bugs
Cheers-

I'm getting warnings like this in a pl/pgsql function:
        ERROR:  pg_class_aclcheck: relation 32523241 not found

The function is (this is, obviously, just to demonstrate the problem):
        create or replace function temptest() returns void
        language plpgsql as '
        DECLARE
            m integer;
            n integer;
        BEGIN
            FOR m IN 1..10 LOOP
                create temp table less_than_m as
                    select distinct pseq_id from pseq where pseq_id<m;
                select into n count(*) from less_than_m;
                raise notice ''there are % less than %'',n,m;
                drop table less_than_m;
            END LOOP;
        END;';

I see one other report of a similar problem and Tom Lane replied
(http://archives.postgresql.org/pgsql-bugs/2003-05/msg00086.php), but I
don't understand the issue or his response. I tried to wrap the create
and drop in EXECUTE '...', but that didn't work.

Does anyone have a suggestion for how I might resolve this? I'd
appreciate a short description of the issue as well.

Thanks,
Reece

--
Reece Hart, Ph.D.                       rkh@gene.com, http://www.gene.com/
Genentech, Inc.                         650/225-6133 (voice), -5389 (fax)
Bioinformatics and Protein Engineering
1 DNA Way, MS-93                        http://www.in-machina.com/~reece/
South San Francisco, CA  94080-4990     reece@in-machina.com, GPG: 0x25EC91A0

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [GENERAL] Partial indices...
Следующее
От: Igor Shevchenko
Дата:
Сообщение: ...