Re: Suggestion for Easier Cross-Database Query Handling in PostgreSQL

From: Frank Heikens <frank(at)elevarq(dot)com>
To: Shivam Pandey <shivampandey91199(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Suggestion for Easier Cross-Database Query Handling in PostgreSQL
Date: 2026-05-15 22:17:53
Message-ID: F93CFB3A-0269-4261-804C-0CBAB5DF089D@elevarq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi Shivam,

Thank you for your feedback.

One important difference is terminology.

In MySQL, CREATE DATABASE and CREATE SCHEMA are essentially the same command, so what MySQL calls a “database” is effectively a schema (namespace).

PostgreSQL also supports querying across schemas natively, so the same functionality is already available when the objects are in the same PostgreSQL database.

In PostgreSQL, a database is a true isolation boundary with its own catalogs and connection context. Because of this design, direct joins across databases are not supported. When this is required, postgres_fdw is the recommended solution.

So for most MySQL users, the equivalent approach in PostgreSQL is to use multiple schemas within a single database rather than multiple databases.

Best regards,
Frank Heikens

> On May 15, 2026, at 3:06 PM, Shivam Pandey <shivampandey91199(at)gmail(dot)com> wrote:
>
> 
> Hello PostgreSQL Team,
>
> I would like to share feedback from a developer perspective regarding cross-database querying in PostgreSQL.
>
> One feature that many developers appreciate in MySQL is the ability to directly query and join tables across multiple databases within the same server instance. This approach becomes very useful in real-world situations where applications need to access shared or distributed data quickly and efficiently.
>
> In PostgreSQL, achieving similar functionality often requires additional setup using extensions such as postgres_fdw or dblink. While these solutions are powerful and architecturally clean, they can feel complex for developers who are building applications rapidly or migrating from systems like MySQL.
>
> It would be valuable if PostgreSQL could provide a more developer-friendly and simplified native approach for cross-database querying while still maintaining PostgreSQL’s strong isolation and security principles.
>
> Possible improvements could include:
>
> 1)Simpler syntax for cross-database joins
> 2) Easier configuration for trusted local databases
> 3) Built-in lightweight federation support
> 4) Better onboarding documentation for multi-database use cases
>
> PostgreSQL is already one of the most powerful and respected databases in the industry. Enhancing developer convenience in this area could make adoption even smoother for many teams.
>
> Thank you for your incredible work and continuous innovation.
>
> Best Regards,
> Shivam Pandey

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2026-05-15 22:56:46 Re: Suggestion for Easier Cross-Database Query Handling in PostgreSQL
Previous Message Igor Korot 2026-05-15 21:49:29 Re: Problem linking with Release library