Re: CREATE ROUTINE MAPPING - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: CREATE ROUTINE MAPPING
Date
Msg-id CADkLM=edk8dFDocuDLkoHMt79-wHy4ZA_Tec6vdXyr=gA++ZSQ@mail.gmail.com
Whole thread Raw
In response to Re: CREATE ROUTINE MAPPING  (David Fetter <david@fetter.org>)
Responses Re: CREATE ROUTINE MAPPING
List pgsql-hackers

>
> But other situations seem un-handle-able to me:
>
> SELECT remote_func1(l.x) FROM local_table l WHERE l.active = true;

Do we have any way, or any plan to make a way, to push the set (SELECT
x FROM local_table WHERE active = true) to the remote side for
execution there?  Obviously, there are foreign DBs that couldn't
support this, but I'm guessing they wouldn't have much by way of UDFs
either.

No. The remote query has to be generated at planning time, so it can't make predicates out of anything that can't be resolved into constants by the planner itself. The complexities of doing so would be excessive, far better to let the application developer split the queries up because they know better which parts have to resolve first.


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least9.5)?
Next
From: Robert Haas
Date:
Subject: Re: [PATCH][PROPOSAL] Refuse setting toast.* reloptions when TOASTtable does not exist