Re: ERROR: relation with OID XXXX does not exist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: relation with OID XXXX does not exist
Дата
Msg-id 29508.1187413841@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ERROR: relation with OID XXXX does not exist  ("David Monarchi" <david.e.monarchi@gmail.com>)
Ответы Re: ERROR: relation with OID XXXX does not exist  ("David Monarchi" <david.e.monarchi@gmail.com>)
Список pgsql-novice
"David Monarchi" <david.e.monarchi@gmail.com> writes:
> I am executing a function which includes the code fragment shown below.  It
> goes through the loop and then fails with the error message
>      ERROR: relation with OID 591161 does not exist

I think the problem is here:

>   -- drop & recreate table for sorting
>   drop table if exists dom1_classid_sorted_temp;
>   create table dom1_classid_sorted_temp (id_dom integer, class_rank_dom
> serial) without oids;

plpgsql tries to cache plans for its queries, and dropping a table
invalidates any already-made plans for that table.  Can you TRUNCATE
the table instead?

PG 8.3 will be smarter about this sort of thing.

            regards, tom lane

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

Предыдущее
От: "David Monarchi"
Дата:
Сообщение: ERROR: relation with OID XXXX does not exist
Следующее
От: Christoph Frick
Дата:
Сообщение: Re: large duplicated files