Search Postgresql Archives

view/pgpgsql functions bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux