(BUG ?) unprefixed oid -> ERROR: cache lookup failed for function

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: (BUG ?) unprefixed oid -> ERROR: cache lookup failed for function
Date: 2012-06-21 14:17:01
Message-ID: C4DAC901169B624F933534A26ED7DF310861B5E1@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

(9.1.4)

Hello,

following query is wrong in my understanding, as it doesn't specify
which oid to use (pg_proc or pg_roles ?)
but it is accepted by the parser

select pg_get_functiondef(oid) -- should be
pg_get_functiondef(pg_proc.oid)
from pg_proc join pg_roles
on ( pg_proc.proowner=pg_roles.oid )
LIMIT 1

ERROR: cache lookup failed for function 10

EXPLAIN VERBOSE:

Limit (cost=0.00..0.31 rows=1 width=4)
Output: (pg_get_functiondef(pg_authid.oid))
-> Nested Loop (cost=0.00..1028.66 rows=3337 width=4)
Output: pg_get_functiondef(pg_authid.oid)
Join Filter: (pg_proc.proowner = pg_authid.oid)
-> Seq Scan on pg_catalog.pg_proc (cost=0.00..318.37 rows=3337
width=4)
Output: pg_proc.proname, pg_proc.pronamespace,
pg_proc.proowner, pg_proc.prolang, pg_proc.procost, pg_proc.prorows,
pg_proc.provariadic, pg_proc.proisagg, pg_proc.proiswindow,
pg_proc.prosecdef, pg_proc.proisstrict, pg_proc.proretset,
pg_proc.provolatile, pg_proc.pronargs, pg_proc.pronargdefaults,
pg_proc.prorettype, pg_proc.proargtypes, pg_proc.proallargtypes,
pg_proc.proargmodes, pg_proc.proargnames, pg_proc.proargdefaults,
pg_proc.prosrc, pg_proc.probin, pg_proc.proconfig, pg_proc.proacl
-> Materialize (cost=0.00..1.21 rows=14 width=4)
Output: pg_authid.oid
-> Seq Scan on pg_catalog.pg_authid (cost=0.00..1.14
rows=14 width=4)
Output: pg_authid.oid

best regards,

Marc Mamin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Evan Martin 2012-06-21 14:50:07 Re: Please make it easy to drop a database that is in use
Previous Message Adrian Klaver 2012-06-21 14:07:42 Re: Error message "psql: could not connect to server: No such file or directory"