From: Shigeru HANADA <shigeru.hanada@gmail.com>
To: digoal@126.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6708: pgsql_fdw's foreign table cann't used in plpgsql function
Date: Wed, 04 Jul 2012 12:07:04 +0900
Message-ID: <4FF3B358.9040307@gmail.com> (raw)
In-Reply-To: <E1Sjfif-0008SV-9N@wrigleys.postgresql.org>
References: <E1Sjfif-0008SV-9N@wrigleys.postgresql.org>
(2012/06/27 9:02), digoal@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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: shigeru.hanada@gmail.com, digoal@126.com
Subject: Re: BUG #6708: pgsql_fdw's foreign table cann't used in plpgsql function
In-Reply-To: <4FF3B358.9040307@gmail.com>
References: <E1Sjfif-0008SV-9N@wrigleys.postgresql.org> <4FF3B358.9040307@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox