AW: [BUG] views and functions on relations - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: [BUG] views and functions on relations
Date
Msg-id 11C1E6749A55D411A9670001FA687963368292@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> In latest 7.1 (checked out 2 days ago from CVS), I see following
> behaviour:
> 
> create table foo(x int4);
> create function xx(foo) returns int4 as ' return 0;' language 'plpgsql';
> create view tv2 as select xx(foo) from foo;

regression=# create function xx(foo) returns int4 as ' return 0;' language 'plpgsql';
CREATE

regression=# \d tv2
ERROR:  cache lookup of attribute 0 in relation 145121 failed

Above function does not compile:
regression=# select * from tv2;
NOTICE:  plpgsql: ERROR during compile of xx near line 1
ERROR:  parse error at or near "return"

Try to see whether the problem persists with a valid function.

Andreas


pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: Another news story in need of 'enlightenment'
Next
From: Karel Zak
Date:
Subject: Re: Strange behaviour of to_date()