From: Tom Lane <tgl@sss.pgh.pa.us>
To: shigeo Hirose <shigeo.hirose@toshiba.co.jp>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: How can I pushdown of functions used in targetlist with FDW ?
Date: Wed, 08 Jan 2020 23:53:19 -0500
Message-ID: <19345.1578545599@sss.pgh.pa.us> (raw)
In-Reply-To: <f10e87b5-1340-bfeb-9009-ba4adb3eed65@swc.toshiba.co.jp>
References: <f10e87b5-1340-bfeb-9009-ba4adb3eed65@swc.toshiba.co.jp>
shigeo Hirose <shigeo.hirose@toshiba.co.jp> writes:
> How can I pushdown of functions used in targetlist with FDW ?
There is, AFAIK, no provision for that. There's not a lot of
reason to consider adding it either, because there's no reason
to suppose that the remote node can run such a function any
faster than the local node. So the difficulty and risk of
determining/assuming that f(x) on the local node is the same
as f(x) on the remote node doesn't seem like it'd be repaid.
You can force matters by making a foreign table that points to a view
on the remote side, where the view includes the function call as an
output column. It wouldn't be perfectly transparent of course; you'd
have to modify the local query to refer to that column rather than
calling the function explicitly.
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, shigeo.hirose@toshiba.co.jp
Subject: Re: How can I pushdown of functions used in targetlist with FDW ?
In-Reply-To: <19345.1578545599@sss.pgh.pa.us>
References: <f10e87b5-1340-bfeb-9009-ba4adb3eed65@swc.toshiba.co.jp> <19345.1578545599@sss.pgh.pa.us>
* 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