Re: problems selecting from altered table

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: problems selecting from altered table
Дата
Msg-id 20070619110939.173da32c.wmoran@potentialtech.com
обсуждение исходный текст
Ответ на problems selecting from altered table  (Rikard Pavelic <rikard.pavelic@zg.htnet.hr>)
Ответы Re: problems selecting from altered table  (Rikard Pavelic <rikard.pavelic@zg.htnet.hr>)
Список pgsql-general
In response to Rikard Pavelic <rikard.pavelic@zg.htnet.hr>:
>
> I noticed that some of the functions I created don't work anymore.
> So I tired to reproduce the problem and this is what I came up with.
>
> create table test(
> id serial primary key,
> tekst text);
>
> insert into test values(1,'1'),(2,'2');
>
> create function sel_test() returns test as
> $$
> declare red record;
> begin
>     select * into red from test limit 1;
>     return red;
> end
> $$ language plpgsql;
>
> select * from sel_test();
>
> This all works ok, but if I do
>
> alter table test drop column tekst;
>
> then select * from sel_test(); doesn't work anymore
> Even if I recreate the function.
>
> Is this a known problem?

Have you tried altering the table, then disconnect and reconnect, then run
your stored procedure?

If that works, then the problem has to do with OID caching, which is known.

--
Bill Moran
http://www.potentialtech.com

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

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Re: pg_restore out of memory
Следующее
От: Gerhard Hintermayer
Дата:
Сообщение: Re: Apparent Wraparound?