view/pgpgsql functions bug

Поиск
Список
Период
Сортировка
От Joe Maldonado
Тема view/pgpgsql functions bug
Дата
Msg-id 421CD3D1.6080202@webehosting.biz
обсуждение исходный текст
Ответы Re: view/pgpgsql functions bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
After a create or replace view, the new view definition is not being
used by plpgsql functions that use the view. Is this a known bug ? Is
there a workaround it ?

For instance, selecting from afunc() still returns the old view's results.

create table c ( a int );
create or replace view a as select * from c;
insert into c values (1);

create or replace function afunc() returns integer AS'
 declare
    val int;
 begin
    select into val a from A;
    return val;
 end;
' language 'plpgsql';

select * from afunc();
 afunc
-------
     1
(1 row)

create table d ( a int );
create or replace view a as select * from d;
insert into d values (2);

select * from afunc();
 afunc
-------
     1
(1 row)

Thanks.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: reltuples < # of rows
Следующее
От: "Craig Bryden"
Дата:
Сообщение: Re: ADO and timestamp/date errors