How can I pushdown of functions used in targetlist with FDW ?

From: shigeo Hirose <shigeo(dot)hirose(at)toshiba(dot)co(dot)jp>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: How can I pushdown of functions used in targetlist with FDW ?
Date: 2020-01-09 04:34:08
Message-ID: f10e87b5-1340-bfeb-9009-ba4adb3eed65@swc.toshiba.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


How can I pushdown of functions used in targetlist with FDW ?

I know non-built-in functions can pushdown with WHERE clauses.
https://www.postgresql.org/docs/12/postgres-fdw.html#id-1.11.7.42.10

But I would like to pushdown function when use targetlist.
For example, I would like to change "Remote SQL: SELECT h FROM
public.hs" to "Remote SQL: SELECT avals(h) FROM public.hs" in bellow case.

postgres=# explain (verbose) SELECT avals(h) FROM tab_hstore;
QUERY PLAN
------------------------------------------------------------------------------
Foreign Scan on public.tab_hstore (cost=100.00..157.52 rows=1462
width=32)
Output: avals(h)
Remote SQL: SELECT h FROM public.hs

How to pushdown function in targetlist with FDW?
And if it can not pushdown, do you have a plan to add features?

Regards,
Shigeo Hirose

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2020-01-09 04:36:18 Re: Postgres streaming replication
Previous Message Michael Paquier 2020-01-09 04:31:39 Re: what to do after a failover