Re: Cross DB query

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cross DB query
Date: 2021-12-08 18:29:57
Message-ID: CAKFQuwaVRoLJoUyHW64eVzwLobRbYMs_Q8J96CXgzbKoJZ4g-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, December 8, 2021, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> wrote:

> A question I always have, and I didn´t find anybody answering it. If it´s
> possible
> select * from MyDB.MySchema.MyTable;
>

No, if you specify MyDB is must match the database you’ve chosen to log
into.

> Everything I found was how to connect, using FDW or DBLink, but not why.
>
>
Because someone decades ago made that decision and all of the internals
rely upon it, making a change cost prohibitive. In short, we allow the
syntax because that standard says we should but its not very useful beyond
that.

I’m pretty sure I’ve seen this in the documentation but a quick glance
didn’t turn it up. Experimentation does prove that it works in this manner
though.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neha Sharma 2021-12-08 19:57:31 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Previous Message John Naylor 2021-12-08 18:11:46 Re: speed up verifying UTF-8