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 1npLf4-0007IT-VB for pgsql-general@arkaria.postgresql.org; Fri, 13 May 2022 03:08:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1npLf3-0005Xm-G8 for pgsql-general@arkaria.postgresql.org; Fri, 13 May 2022 03:08:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npLf3-0005Xc-5R for pgsql-general@lists.postgresql.org; Fri, 13 May 2022 03:08:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npLf1-0003Md-0H for pgsql-general@lists.postgresql.org; Fri, 13 May 2022 03:08:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24D386V6569305; Thu, 12 May 2022 23:08:06 -0400 From: Tom Lane To: Bryn Llewellyn cc: "David G. Johnston" , Adrian Klaver , Neeraj M R , pgsql-general list Subject: Re: Restricting user to see schema structure In-reply-to: References: <048ab2c5-ddf6-d039-3c2a-1828d8c9137b@aklaver.com> Comments: In-reply-to Bryn Llewellyn message dated "Thu, 12 May 2022 19:35:56 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <569303.1652411286.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 12 May 2022 23:08:06 -0400 Message-ID: <569304.1652411286@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bryn Llewellyn writes: > Maybe this entire discussion is moot when hackers can read the C code of= PG's implementation=E2=80=A6 Hmm ... in one way that's unrelated, but in another way perhaps it is. Postgres' system catalogs have always been user-readable as much as possible, excepting only cases that clearly might contain private data such as pg_statistic or pg_user_mapping.umoptions. We have pretty much no interest in revisiting that design choice, even if doing so wouldn't likely break a couple decades' worth of client-side software development. It's not very hard to draw a line connecting that design choice to our open-source ethos. Anyway, if you feel a need to prevent user A from seeing the catalog entries for user B's database objects, the only answer we have is to put A and B into separate databases. If despite that you want A and B to be able to share some data, you can probably build the connections you need using foreign tables or logical replication; but there's not a lot of pre-fab infrastructure for that, AFAIK. regards, tom lane