Обсуждение: BUG #15068: PostgreSQL doesn't support queries that involve columnsfrom multiple databases

Поиск
Список
Период
Сортировка

BUG #15068: PostgreSQL doesn't support queries that involve columnsfrom multiple databases

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      15068
Logged by:          Mahendra Sri dayarathna
Email address:      mahendra@datam.co.uk
PostgreSQL version: 9.4.0
Operating system:   Windows
Description:

I try to create view using involve columns from multiple databases.
then i have issue postgresql cross database reference are not implemented.
how to resolve that issue




Re: BUG #15068: PostgreSQL doesn't support queries that involvecolumns from multiple databases

От
Michael Paquier
Дата:
On Thu, Feb 15, 2018 at 07:16:03AM +0000, PG Bug reporting form wrote:
> I try to create view using involve columns from multiple databases.
> then i have issue postgresql cross database reference are not implemented.
> how to resolve that issue

This is not supported as each backend session can only be connected to
one single database.  Have you considered using different schema for
this purpose?  This is an extra layer that PostgreSQL has which is
different than other RDBMs.
--
Michael

Вложения

Re: BUG #15068: PostgreSQL doesn't support queries that involvecolumns from multiple databases

От
"David G. Johnston"
Дата:
On Thu, Feb 15, 2018 at 12:16 AM, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      15068
Logged by:          Mahendra Sri dayarathna
Email address:      mahendra@datam.co.uk
PostgreSQL version: 9.4.0
Operating system:   Windows
Description:

I try to create view using involve columns from multiple databases.
then i have issue postgresql cross database reference are not implemented.
how to resolve that issue

​This is a question better suited to the -general ​list as it is not a bug report.

If you are indeed using 9.4.0 you need to upgrade to a supported release - which is 9.4.16 at the time of this report.

​In addition to Michael's suggestion of using schema​s you might be able to make use of postgres_fdw


Work on that area has been ongoing recently and if you go for that approach you should probably strongly consider bumping up to version 9.6 or 10.  9.4 has a little over a year of support-life left in it anyway.

David J.