(2012/06/27 9:02), dig...@126.com wrote:
> pgsql_fdw's foreign table "cache lookup failed for type 0" bug when used in
> function

Thanks for the report!

I could reproduce the problem.  The cause of error was wrong handling of
parameters given by PL/pgSQL for PL/pgSQL variables and parameters.

They need instantiation with callback routine, and might have InvalidOid
(0) for type oid.  I fixed pgsql_fdw for two points:

1) instantiate parameters given by PL/pgSQL with callback function
2) use TEXTOID for type-unknown parameters which are not used in remote
query

Please try HEAD of git.
    https://sourceforge.net/projects/interdbconnect/develop

Regards,
-- 
Shigeru HANADA



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

Reply via email to