(2012/06/27 9:02), digoal(at)126(dot)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