From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow postgres_fdw to ship extension funcs/operators for remote
Date: Tue, 03 Nov 2015 23:42:36 +0000
Message-ID: <E1ZtlDo-0006SN-Qc@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Allow postgres_fdw to ship extension funcs/operators for remote execution.
The user can whitelist specified extension(s) in the foreign server's
options, whereupon we will treat immutable functions and operators of those
extensions as candidates to be sent for remote execution.
Whitelisting an extension in this way basically promises that the extension
exists on the remote server and behaves compatibly with the local instance.
We have no way to prove that formally, so we have to rely on the user to
get it right. But this seems like something that people can usually get
right in practice.
We might in future allow functions and operators to be whitelisted
individually, but extension granularity is a very convenient special case,
so it got done first.
The patch as-committed lacks any regression tests, which is unfortunate,
but introducing dependencies on other extensions for testing purposes
would break "make installcheck" scenarios, which is worse. I have some
ideas about klugy ways around that, but it seems like material for a
separate patch. For the moment, leave the problem open.
Paul Ramsey, hacked up a bit more by me
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d89494166351e1fdac77d87c6af500401deb2422
Modified Files
--------------
contrib/postgres_fdw/Makefile | 2 +-
contrib/postgres_fdw/deparse.c | 104 ++++++++---------
contrib/postgres_fdw/option.c | 54 +++++++++
contrib/postgres_fdw/postgres_fdw.c | 38 +------
contrib/postgres_fdw/postgres_fdw.h | 43 ++++++-
contrib/postgres_fdw/shippable.c | 214 +++++++++++++++++++++++++++++++++++
doc/src/sgml/postgres-fdw.sgml | 46 +++++++-
src/backend/utils/adt/format_type.c | 16 ++-
src/include/utils/builtins.h | 1 +
9 files changed, 427 insertions(+), 91 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Allow postgres_fdw to ship extension funcs/operators for remote
In-Reply-To: <E1ZtlDo-0006SN-Qc@gemulon.postgresql.org>
References: <E1ZtlDo-0006SN-Qc@gemulon.postgresql.org>
* 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