Re: [Proposal] Arbitrary queries in postgres_fdw

2019-11-06 Thread rtorre
On Tue, Nov 5, 2019 at 7:41 PM David Fetter wrote: > Could you use IMPORT FOREIGN SCHEMA for that? I seem to recall that > I've managed to import information_schema successfully. Yes, I tried it and I can import and operate on the information_schema, which actually covers part of my needs. It doe

Re: [Proposal] Arbitrary queries in postgres_fdw

2019-11-05 Thread rtorre
> On Fri, Oct 25, 2019 at 12:38 PM Tom Lane wrote: > > end of things. And allowing arbitrary queries to go over a postgres_fdw > > connection would be absolutely disastrous from a debuggability and > > maintainability standpoint, because they might change the remote > > session's state in ways th

Re: [Proposal] Arbitrary queries in postgres_fdw

2019-11-05 Thread rtorre
On Sun, Oct 27, 2019 at 7:07 PM David Fetter 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 leve

Re: [Proposal] Arbitrary queries in postgres_fdw

2019-10-28 Thread rtorre
On Sun, Oct 27, 2019 at 7:07 PM David Fetter 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? Thanks for the idea, David. I'll investigat

[Proposal] Arbitrary queries in postgres_fdw

2019-10-25 Thread rtorre
Dear all, We stumbled upon a few cases in which retrieving information from the foreign server may turn pretty useful before creating any foreign table, especially info related to the catalog. E.g: a list of schemas or tables the user has access to. I thought of using dblink for it, but that requ