Re: dblink without running the full query remotely? - Mailing list pgsql-admin

From Wells Oliver
Subject Re: dblink without running the full query remotely?
Date
Msg-id CAOC+FBWRCUKSJr0Y4DgtPwJCJOtEb_FT395dmub=ggKE2YLXiQ@mail.gmail.com
Whole thread Raw
In response to Re: dblink without running the full query remotely?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: dblink without running the full query remotely?  (M Sarwar <sarwarmd02@outlook.com>)
List pgsql-admin
Thanks, this it exactly.

Correlated, is there a way to define a fdw user mapping for a role versus for every single individual user in a database?


On Fri, Aug 25, 2023 at 2:16 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Wells Oliver <wells.oliver@gmail.com> writes:
> Per the documentation -- *dblink fetches the entire remote query result
> before returning any of it to the local system* -- I am guessing the answer
> is no, but I wondered if there was some way to do something like this:
> ...
> Where that remote sometable might have a bajillion rows and the local where
> would be passed to it

No, and it's unlikely anyone would ever put effort into making dblink
do that, because the newer foreign table (FDW) code *does* handle that
sort of thing.  dblink still has its uses, but it's pretty much at a
dead end developmentally.  Take a look at postgres_fdw.

                        regards, tom lane


--

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: dblink without running the full query remotely?
Next
From: M Sarwar
Date:
Subject: Re: dblink without running the full query remotely?