Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgis6-0000F3-Ao for pgsql-general@arkaria.postgresql.org; Thu, 04 Jun 2020 05:56:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jgis2-0003TA-QL for pgsql-general@arkaria.postgresql.org; Thu, 04 Jun 2020 05:56:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgis2-0003T2-EE for pgsql-general@lists.postgresql.org; Thu, 04 Jun 2020 05:56:54 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jgis0-0000oX-2S for pgsql-general@lists.postgresql.org; Thu, 04 Jun 2020 05:56:54 +0000 Received: by mail-ej1-x62d.google.com with SMTP id gl26so4679448ejb.11 for ; Wed, 03 Jun 2020 22:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=sHEjnokcxRkmHcqjgOZfyH5bAppV/OTs9OGCuT2iJ2k=; b=SusuWScdBOMJy3zjcxyvVj2+tZa7zPE5oshZrel+LOyGzQaEsk8avL164KFbo9uNKe nQDK1hhmA6d530tlVUVKGWeNqqF9atvOY2WTxP8rL/10pLElukVo8JOzhCm1G9dh8zk8 831LQiCPbp/RikBmIl3O+tc4Ajiyxor7MB1aUAVu0KPvxswXVFVY15rWdumfr8Ih0rh7 ZO4SC/tOCcdokw30JXLjIj3x6AavgvBbei3vD/qSEcjYbX3u2T/fA496f64jax/UKIot moW/LNwB3q65ysFKYOOBZ3g6IpcD01SHQXTqV/ZpPdTQF2srxs/4uEKXYLO5o7I+atKO 5bpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=sHEjnokcxRkmHcqjgOZfyH5bAppV/OTs9OGCuT2iJ2k=; b=Xs/gbBwyVaj/6HEDOyzCsjvZEbrLfQdTveA498d0brSxpxdoSzwENYqk5SEL77ANc6 +GF7DHe+gEHH/Gt8Qnx6oS0CkpRJ9eyMhLhGnHWS9jB6XE0+o0/xQEWRyT2ERdi6ays8 4343RFkoiCexX9rZ1XEB6NF8K8O9m6N/btrK6g+K8drqvP0a/e2fK6vH2qiwFNWgjene bx6hqhEWobOUsTxp7pPcoItV79bgkqz42K7phjvDeheGXx4flA6n0KJAEzcVpViivUEe WBpeIR5zX8/NvDLfBS7jBfnkpsYy/1haYhku10XZfO7E1dnHQLTaslwOl1BoAzEGk4DP Qh3Q== X-Gm-Message-State: AOAM530naXKfdwLpDsIeCWajTXYZYwJWL/Qlt0x+vJ+dr6zo7SBzdg6K lYPBfjRWdYHaFJJFTwEmrIjJ9g== X-Google-Smtp-Source: ABdhPJzxz+jkRp7vhClv4BR0jN8KUOwwHiKf4eFJyTSFocUw9oYSLrugBbKXlQ9oNgoy/q+MLwIzwA== X-Received: by 2002:a17:906:71b:: with SMTP id y27mr2503849ejb.537.1591250210442; Wed, 03 Jun 2020 22:56:50 -0700 (PDT) Received: from localhost.localdomain (217-149-170-223.nat.highway.telekom.at. [217.149.170.223]) by smtp.gmail.com with ESMTPSA id k3sm1315567edi.60.2020.06.03.22.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 22:56:49 -0700 (PDT) Message-ID: <39ebae9e6498e4fce6e80f94dfc222d7b032ad84.camel@cybertec.at> Subject: Re: Can we get SQL Server-like cross database queries From: Laurenz Albe To: Thomas Munro , Ron Cc: "pgsql-generallists.postgresql.org" Date: Thu, 04 Jun 2020 07:56:49 +0200 In-Reply-To: References: <84A3D231-6AFB-4981-AA09-18FBC7772B77@gmail.com> <1148385.1591213602@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. I think this is particularly relevant since all databases share the same users. I understand that sometimes the opposite would be desirable, but foreign data wrappers have alleviated that pain. Yours, Laurenz Albe