Re: BUG #3718: Unexpected undefined_table error after creating/dropping tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3718: Unexpected undefined_table error after creating/dropping tables
Дата
Msg-id 14245.1194193314@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #3718: Unexpected undefined_table error after creating/dropping tables  ("Dean" <ratq92nomr@hotmail.com>)
Ответы Re: BUG #3718: Unexpected undefined_table error after creating/dropping tables  (ratq nomr <ratq92nomr@hotmail.com>)
Список pgsql-bugs
"Dean" <ratq92nomr@hotmail.com> writes:
> If I create a function which relies on the undefined_table exception to test
> if a table exists, it does not behave as expected.

Try issuing the DELETE via EXECUTE --- you're getting burnt by plan
caching.

But actually, do you really want something as destructive as DELETE
for an existence probe?  I'd try

    PERFORM 'bar'::text::regclass;

and see if that throws an error.  (The double cast is important here,
so that you get a runtime lookup not a compile-time one.)

            regards, tom lane

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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: BUG #3706: ecpg regression: "MOVE FORWARD"
Следующее
От: ratq nomr
Дата:
Сообщение: Re: BUG #3718: Unexpected undefined_table error after creating/dropping tables