Re: [Proposal] Arbitrary queries in postgres_fdw

From: David Fetter <david(at)fetter(dot)org>
To: rtorre(at)carto(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Proposal] Arbitrary queries in postgres_fdw
Date: 2019-11-05 18:41:55
Message-ID: 20191105184155.GB7444@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 05, 2019 at 11:09:34AM +0100, rtorre(at)carto(dot)com wrote:
> On Sun, Oct 27, 2019 at 7:07 PM David Fetter <david(at)fetter(dot)org> wrote:
> > There's a SQL MED standard feature for CREATE ROUTINE MAPPING that
> > does something similar to this. Might it be possible to incorporate
> > it into the previous patch that implemented that feature?
>
> Supporting CREATE ROUTINE MAPPING goes a level beyond
> postgres_fdw. It'd require adding new DDL syntax elements to the
> parser, catalog and callbacks for the FDW's to support them.
>
> For the record, there's a very interesting thread on this topic (that
> you participated in):
> https://www.postgresql.org/message-id/flat/CADkLM%3DdK0dmkzLhaLPpnjN2wBF5GRpvzOr%3DeW0EWdCnG-OHnpQ%40mail.gmail.com
>
> I know they have different semantics and may turn more limiting, but
> for certain use cases, the `extensions` parameter of postgres_fdw may
> come in handy (shipping function calls to the foreign end from
> extensions present in both local and foreign).
>
> For my use case, which is retrieving catalog info before any CREATE
> FOREIGN TABLE,

Could you use IMPORT FOREIGN SCHEMA for that? I seem to recall that
I've managed to import information_schema successfully.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-11-05 19:19:48 deferrable FK constraints on partitioned rels
Previous Message Tom Lane 2019-11-05 18:41:28 Re: Include RELKIND_TOASTVALUE in get_relkind_objtype