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 1nyK7M-0002Jq-88 for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jun 2022 21:18:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nyK7K-00023G-V6 for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jun 2022 21:18:30 +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 1nyK7K-000237-Mt for pgsql-bugs@lists.postgresql.org; Mon, 06 Jun 2022 21:18:30 +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 1nyK7E-0002my-Cl for pgsql-bugs@lists.postgresql.org; Mon, 06 Jun 2022 21:18:29 +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 256LIMu7953811; Mon, 6 Jun 2022 17:18:22 -0400 From: Tom Lane To: "David G. Johnston" cc: khp@equatoria.us, PostgreSQL mailing lists Subject: Re: BUG #17511: Inconsistent permissions on some information_schema tables In-reply-to: References: <17511-ee45925b30436a87@postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Mon, 06 Jun 2022 12:59:32 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <953809.1654550302.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 06 Jun 2022 17:18:22 -0400 Message-ID: <953810.1654550302@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Mon, Jun 6, 2022 at 11:50 AM PG Bug reporting form < > noreply@postgresql.org> wrote: >> The table at issue is constraint_column_usage--the ordinary role 'apach= e' >> does not have SELECT rights to that table, though it does to the other = two >> catalog tables used by this query. > Haven't tried to duplicate but I'm not following. constraint_column_usage certainly does/should have public read access: postgres=3D# \z information_schema.constraint_column_usage Access privileges Schema | Name | Type | Access privileg= es | Column privileges | Policies = --------------------+-------------------------+------+--------------------= -------+-------------------+---------- information_schema | constraint_column_usage | view | postgres=3DarwdDxt/= postgres+| | = | | | =3Dr/postgres = | | = (1 row) I think what the OP is complaining about is that its *contents* are filtered, ie you can't see rows about tables you don't have any privileges on. However, that behavior is mandated by the SQL standard, and in our view the sole reason for existence of the information_schema views is to be standard-conforming. So we won't be removing that filter unless you can talk the SQL committee into dropping that requirement. If you want an unfiltered view, look directly at the system catalogs. regards, tom lane