From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | shigeo Hirose <shigeo(dot)hirose(at)toshiba(dot)co(dot)jp> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: How can I pushdown of functions used in targetlist with FDW ? |
Date: | 2020-01-09 04:53:19 |
Message-ID: | 19345.1578545599@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
shigeo Hirose <shigeo(dot)hirose(at)toshiba(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Lewis | 2020-01-09 05:02:38 | Re: Upgrade PostgreSQL 9.6 to 10.6 |
Previous Message | Michael Paquier | 2020-01-09 04:36:18 | Re: Postgres streaming replication |