Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVzRK-0006k4-7n for pgsql-general@arkaria.postgresql.org; Wed, 29 May 2019 14:20:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hVzRG-0005bs-RD for pgsql-general@arkaria.postgresql.org; Wed, 29 May 2019 14:20:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVzRE-0005bl-R6 for pgsql-general@lists.postgresql.org; Wed, 29 May 2019 14:20:22 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVzRB-0001QM-BU for pgsql-general@postgresql.org; Wed, 29 May 2019 14:20:19 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 1094167C; Wed, 29 May 2019 10:20:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 29 May 2019 10:20:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=s UPczRQ9WSuMkNqj8DrkM7wCt9aYJkaKyedmyyNICcE=; b=V3mC+JuQaWAeCIzid kk2CiO2gxvbVOc3wLEZxHiyToNFBPrmYqUMJA7Ys5xcU1+xrQ1oXfp5FIvd6qiPZ SnkCiz/ewhLLUOQTev9DO5bJv2Yf+noKox0q/MkgpBhndw0oX0xUMC5lsRxzbP4o euZAVULVPR/pMcgAdVn+pwIsit1piFfOnqSFVAwDOJxlu1cr2IlFDIgtmypU3WdK PfrIXVUotLuFDN/gHPBjVM9DGqFtQ/3s6Rn9vCTq8TzWNp98L5OtW76zm4JcCHxP b5YQUbee0Ge7Sa+7DBNKkZMFRnEuw/j8b1qbfyHs90bexg26TMfzwH98AFq7xi0I AraoQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=sUPczRQ9WSuMkNqj8DrkM7wCt9aYJkaKyedmyyNIC cE=; b=6/bvU0HhJcOS4MV+OfBHZlPuY3VWXc7YRRSlCpNNrlNY0vliQI5JC40DC rWIcco1z+3JGhHVgSEVwJ1kEhOA1tPbRr3peum0O24Kc4KwKaI/+U8agOCKcSDOq htD0kloHU+r03V3dxceF0HaVcIe8XgownOpbtv/b7OwM/KxGdLk/1EUtacobhylh 5XHvzo//zIo/Gz/REF2CfmBe+pLA+Y5iD28KfeIYT+EwIvQSOqIbyKddvc4nVWFt ztSh2O4269o0YMluSqv4BlLXeHjLlBJOP2SfeYENADvpfRArqOIL1BFIP45nRg4q Cb2axbXshOZVR/y1LcDIVOOoFONIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddvjedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuve hluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 78CF2380087; Wed, 29 May 2019 10:20:13 -0400 (EDT) Subject: Re: To: Pawan Sharma , "pgsql-general@postgresql.org >> PG-General Mailing List" References: From: Adrian Klaver Message-ID: <2b9280b6-8fe9-8b5f-337c-cd32fa26201b@aklaver.com> Date: Wed, 29 May 2019 07:20:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/29/19 1:03 AM, Pawan Sharma wrote: > Hello All, > > Is it possible check privileges of all the users or roles, and what are > the objects owned by user and role with their privileges. > > I am getting the output which want from > information_schema.roles_usage_grants, but as I not running the query as > a superuser so I am able to see only one specific user results but I > want all user and roles details. Are you sure? information_schema.roles_usage_grants is a view over information_schema.usage_privileges which only covers the USAGE privilege. This privilege is restricted to a subset of objects. Look in the object_type column. My guess is you are going to end up using the system catalogs: https://www.postgresql.org/docs/11/catalogs.html Can you be more specific about the information you are looking for? > > Is there specific privileges which I can grant to that user to get the > complete results apart from superuser privilege. > > > Thanks in advance > Regards, > Pawan -- Adrian Klaver adrian.klaver@aklaver.com