Re: UDF calls and FDW - Mailing list pgsql-general

From Tom Lane
Subject Re: UDF calls and FDW
Date
Msg-id 19937.1396629522@sss.pgh.pa.us
Whole thread Raw
In response to UDF calls and FDW  (Emmanuel Medernach <medernac@clermont.in2p3.fr>)
List pgsql-general
Emmanuel Medernach <medernac@clermont.in2p3.fr> writes:
> So the problem is that is  calls the UDF on the FDW node (Foreign
> Scan on master_object_000 + Filter) and not on the remote server.

Right.

>    - How to call the UDF on the remote server ?

postgres_fdw intentionally refuses to do this, because it has no way
to know whether q3c_radial_query() is the same function, or even
exists at all, on the remote server.  Only WHERE clauses involving
built-in functions/operators will be pushed across to the remote server.

Barring solutions for that philosophical question, you might be able
to do something like putting the function call into a view on the remote
side and then creating a foreign table that references the view.

            regards, tom lane


pgsql-general by date:

Previous
From: David Boreham
Date:
Subject: Re: SSD Drives
Next
From: Merlin Moncure
Date:
Subject: Re: SSD Drives