Re: How can I pushdown of functions used in targetlist with FDW ? - Mailing list pgsql-general

From Tom Lane
Subject Re: How can I pushdown of functions used in targetlist with FDW ?
Date
Msg-id 19345.1578545599@sss.pgh.pa.us
Whole thread Raw
In response to How can I pushdown of functions used in targetlist with FDW ?  (shigeo Hirose <shigeo.hirose@toshiba.co.jp>)
Responses Re: How can I pushdown of functions used in targetlist with FDW ?
List pgsql-general
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



pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Postgres streaming replication
Next
From: Michael Lewis
Date:
Subject: Re: Upgrade PostgreSQL 9.6 to 10.6