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

Started by PG Bug reporting formabout 8 years ago3 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

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

#2Michael Paquier
michael@paquier.xyz
In reply to: PG Bug reporting form (#1)
Re: BUG #15068: PostgreSQL doesn't support queries that involve columns from multiple databases

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

#3David G. Johnston
david.g.johnston@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #15068: PostgreSQL doesn't support queries that involve columns from multiple databases

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

https://www.postgresql.org/docs/10/static/postgres-fdw.html

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.