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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: shigeo Hirose <shigeo(dot)hirose(at)toshiba(dot)co(dot)jp>, 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 19:12:25
Message-ID: 8248.1578597145@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> I agree with all of that- but it seems like we've got people asking for
> it, and I can understand why they are, and therefore I'd be inclined to
> provide a way for users to get that behavior and I'm even inclined to
> say that pushing down should be the 'default' if everything else is
> equal and it's possible to do so.

[ shrug... ] I think that's a completely arbitrary value judgment
unsupported by any facts. Furthermore, it'd greatly expand our exposure
to problems with "we thought this function behaves the same on the remote
end, but it doesn't". That hazard makes me feel that the default should
*never* be to encourage pushing down, unless there's a pretty clear
potential win to justify the risk of breakage.

If SQL/MED has a notion of a "foreign function" that is only executable on
the remote side, and that fails if you try to execute it locally, then
it'd make sense to implement that feature and then expect postgres_fdw to
try hard to push down such calls. But we don't have that (yet). I'm
unconvinced that ordinary functions ought to be treated as if remote
execution is preferable.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2020-01-09 19:20:56 ESQL/C FETCH of CHAR data delivers to much data for UTF-8
Previous Message Tom Lane 2020-01-09 18:48:01 Re: 12.1 not useable: clientlib fails after a dozen queries (GSSAPI ?)