| From: | Joe Maldonado <jmaldonado(at)webehosting(dot)biz> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | view/pgpgsql functions bug |
| Date: | 2005-02-23 19:04:49 |
| Message-ID: | 421CD3D1.6080202@webehosting.biz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Cristian Prieto | 2005-02-23 19:16:20 | Seguimos buscando webdeveloper... |
| Previous Message | Tom Lane | 2005-02-23 18:18:41 | Re: reltuples < # of rows |