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

From shigeo Hirose
Subject How can I pushdown of functions used in targetlist with FDW ?
Date
Msg-id f10e87b5-1340-bfeb-9009-ba4adb3eed65@swc.toshiba.co.jp
Whole thread Raw
Responses Re: How can I pushdown of functions used in targetlist with FDW ?
List 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



pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: what to do after a failover
Next
From: Michael Paquier
Date:
Subject: Re: Postgres streaming replication