Re: [BUG] views and functions on relations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Pilosov <alex(at)pilosoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUG] views and functions on relations
Date: 2001-04-18 15:25:11
Message-ID: 9860.987607511@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alex Pilosov <alex(at)pilosoft(dot)com> writes:
> 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;

> users=# \d tv2
> ERROR: cache lookup of attribute 0 in relation 21747 failed

Okay, this is a simple oversight in ruleutils.c: the rule dumper doesn't
have logic to handle whole-tuple function arguments, such as (foo) in
the above example. Will fix.

> HOWEVER, 'select * from tv2' succeeds (sometimes). Sometimes it fails with
> the same error (cache lookup failed).

The ruleutils.c bug cannot explain this however, since ruleutils won't
even be invoked. Can you find a sequence to reproduce it?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Opensoft.ca 2001-04-18 15:57:35 Ethical HH
Previous Message Tom Lane 2001-04-18 14:36:39 Re: AW: timeout on lock feature