Re: "Cache lookup failed for relation 16905" ??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Howe <howe(at)carcass(dot)dhs(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: "Cache lookup failed for relation 16905" ??
Date: 2002-11-02 14:26:56
Message-ID: 20259.1036247216@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Steve Howe <howe(at)carcass(dot)dhs(dot)org> writes:
> I got a weird behavior testing PostgreSQL 7.3b3. The query below was
> run in a FreeBSD 4.4 system, on a fresh install and just I just had
> made an initb. No classes created at all.

> howe=# select p.oid, n.nspname, pg_get_userbyid(p.proowner), proname
> from pg_proc as p, pg_namespace as n where pg_table_is_visible(p.oid);
> ERROR: Cache lookup failed for relation 16905
> ERROR: Cache lookup failed for relation 16905

I think you want pg_function_is_visible, not pg_table_is_visible.

However this does show that the foo_is_visible functions aren't reacting
very nicely when given bad input: they all put out a "Cache lookup
failed" message, rather than something more easily interpretable.

I'm not quite sure what should happen when foo_is_visible is called with
an OID that is not the OID of any foo object; should it quietly return
false, or should it raise a "no such object" error?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug McNaught 2002-11-02 14:33:29 Re: Optimizer Question/Suggestion - numbers after
Previous Message Marc G. Fournier 2002-11-02 10:59:17 Re: CONVERT function is seriously broken