From: Wells Oliver <wells.oliver@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: dblink without running the full query remotely?
Date: Fri, 25 Aug 2023 11:20:23 -0700
Message-ID: <CAOC+FBWCx3iunwdXYRKmr89O2qXNeOHgSTvv13Cju73LNcvKEA@mail.gmail.com> (raw)
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:
create view myview as;
select * from dblink(
'server',
'select id from sometable')
cols(id bigint);
And then
select * from myview where id = 123;
Where that remote sometable might have a bajillion rows and the local where
would be passed to it otherwise it's days and days for all rows to be
returned and then filtered.
--
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: wells.oliver@gmail.com
Subject: Re: dblink without running the full query remotely?
In-Reply-To: <CAOC+FBWCx3iunwdXYRKmr89O2qXNeOHgSTvv13Cju73LNcvKEA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox