Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Marc Mamin" <M.Mamin@xxxxxxxxxxxx> writes:
> 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

The reason that happens is that pg_roles has an explicit oid column (ie,
oid is a regular not system column in the view) so that name takes
precedence over the system column available from pg_proc.  Having to
have an explicit oid column in pg_roles isn't very nice, because of
precisely this type of inconsistency, but since it's a view not a table
there's not a lot of alternatives.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux