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 1k3kWk-0000tL-Q0 for pgsql-general@arkaria.postgresql.org; Thu, 06 Aug 2020 18:22:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k3kWj-0004CN-P0 for pgsql-general@arkaria.postgresql.org; Thu, 06 Aug 2020 18:22:05 +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 1k3kWj-0004CG-Ha for pgsql-general@lists.postgresql.org; Thu, 06 Aug 2020 18:22:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3kWh-0004VN-Dq for pgsql-general@lists.postgresql.org; Thu, 06 Aug 2020 18:22:05 +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 076IM0aO2636628; Thu, 6 Aug 2020 14:22:01 -0400 From: Tom Lane To: Scott Ribe cc: PostgreSQL General Subject: Re: privileges oddity In-reply-to: References: Comments: In-reply-to Scott Ribe message dated "Thu, 06 Aug 2020 12:11:53 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2636626.1596738120.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 06 Aug 2020 14:22:00 -0400 Message-ID: <2636627.1596738120@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Scott Ribe writes: > when user akanzler tries to run query "SELECT * FROM zoewang.sometable..= .", it triggers this error: > 2020-08-06 17:27:27.664 UTC [15914]: [3] user=3Dakanzler,db=3Drisk_oltp_= prod,app=3D[unknown],client=3D10.8.170.24: ERROR: permission denied for s= chema zoewang at character 15 Gonna need more context. The session-level user seems to have the right privileges, but maybe something is happening inside a security-definer function that doesn't have privileges? regards, tom lane