Re: [Proposal] Arbitrary queries in postgres_fdw

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: [Proposal] Arbitrary queries in postgres_fdw
Дата
Msg-id 20191027180720.GA2088@fetter.org
обсуждение исходный текст
Ответ на [Proposal] Arbitrary queries in postgres_fdw  (rtorre@carto.com)
Ответы Re: [Proposal] Arbitrary queries in postgres_fdw  (rtorre@carto.com)
Список pgsql-hackers
On Fri, Oct 25, 2019 at 05:17:18PM +0200, rtorre@carto.com wrote:
> 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 requires duplication of
> server and user mapping details and it adds its own management of
> connections.
> 
> Then I thought a better approach may be a mix of both: a function to
> issue arbitrary queries to the foreign server reusing all the details
> encapsulated in the server and user mapping. It would use the same
> pool of connections.

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?

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Следующее
От: Tom Lane
Дата:
Сообщение: Selecting fields from a RowExpr