Re: Can we get SQL Server-like cross database queries

From: Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Ron <ronljohnsonjr(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Can we get SQL Server-like cross database queries
Date: 2020-06-04 14:21:27
Message-ID: CAOLfK3Xi5VpZHZ6QTuVGR8LDWRzGn3BeuwG8Y=SjL3=eirtTNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 4, 2020 at 12:56 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> On Thu, 2020-06-04 at 16:41 +1200, Thomas Munro wrote:
> > There's no doubt it's useful, and it's also part of the SQL spec,
> > which says you can do catalog.schema.table. I would guess that we
> > might get that as a byproduct of any project to make PostgreSQL
> > multithreaded. That mountain moving operation will require us to get
> > rid of all the global state that currently ties a whole process to one
> > session and one database, and replace it with heap objects with names
> > like Session and Database that can be passed around between worker
> > threads.
>
> I am -1 on cross-database queries.
>
> I think it is a desirable feature to have databases isolated from
> each other, so you don't have to worry about a permission you forgot
> that allows somebody to access a different database.
>

Perhaps make it a new right that can be granted and it is disabled by
default.

Superusers could have it by default.

ALTER USER foo WITH CROSSDB | NOCROSSDB

Obviously there is much more to flesh out than this.

-m

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2020-06-04 14:32:42 Re: When to use PARTITION BY HASH?
Previous Message Sonam Sharma 2020-06-04 13:00:18 Re: Shared memory error