Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmpD-0003nf-MA for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Jul 2018 13:49:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffmpB-000514-RW for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Jul 2018 13:49:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmpB-00050x-La for pgsql-bugs@lists.postgresql.org; Wed, 18 Jul 2018 13:49:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmp8-0008BD-3l for pgsql-bugs@postgresql.org; Wed, 18 Jul 2018 13:49:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6IDmp5V008246; Wed, 18 Jul 2018 09:48:51 -0400 From: Tom Lane To: Thomas Kellerer cc: Yogi S , pgsql-bugs@postgresql.org Subject: Re: PostgreSQL :: Catalog Query In-reply-to: <046cb876-a4b7-f24d-f5d6-67482755fea2@gmx.net> References: <046cb876-a4b7-f24d-f5d6-67482755fea2@gmx.net> Comments: In-reply-to Thomas Kellerer message dated "Wed, 18 Jul 2018 14:52:53 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8244.1531921731.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Jul 2018 09:48:51 -0400 Message-ID: <8245.1531921731@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Kellerer writes: > As far as the SQL standard is concerned Postgres' databases do map to th= e term "catalog" . > The only difference (or deviation from the standard) is, that they are n= o real "namespaces". = > In the SQL standard a fully qualified (table) name consists of three par= ts: > catalog.schema.table > however in Postgres the catalog (while it exists as a "thing") is not al= lowed to be used in a fully qualified name. = You can in fact use the database/catalog name within qualified names: select * from mydb.someschema.sometable; But it's purely for pro forma standards compliance. If you give a three- part name and the first part isn't the current database, you'll just get an error. In theory we might someday extend this to allow cross-database accesses, but I wouldn't hold my breath waiting. In any case, the fact that different DBMSes implement different subsets of the spec isn't a bug, either ours or theirs. regards, tom lane