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 1jkAQt-0006LA-S5 for pgsql-general@arkaria.postgresql.org; Sat, 13 Jun 2020 17:59:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jkAQs-0005XV-PI for pgsql-general@arkaria.postgresql.org; Sat, 13 Jun 2020 17:59:06 +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 1jkAQs-0005XO-Hc for pgsql-general@lists.postgresql.org; Sat, 13 Jun 2020 17:59:06 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkAQp-0004GN-NA for pgsql-general@postgresql.org; Sat, 13 Jun 2020 17:59:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E8C3F416; Sat, 13 Jun 2020 13:59:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 13 Jun 2020 13:59:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=5 +ZYHCRr4vGKiFv395RRcyJ27V2I1OCjYalYnFwKxrE=; b=sWVGAUFsqVrU5tm1I opnEZxZtK+ssTK1r3kmlcFEev4lahIjfSX2ZGhz9g9oAkSt1tOxTjl62bqyKk0sD sXQ6n2WyoD3sMlF3J8Fk7IEPqz5W0bIeo9WU5ZKQ6qIYB4WAfkIQMgdQ9YPaZsiu NfXFN7ir7jqR08sIJ78z+L36Ppw5WY9rOqArFXWXNRByOfxWfYtGo3uANiyfJ+6O sVd++UKWjXpCEuZ6GsiQxWhRqxfDxX0MdTu3Xz83pschw/w+DUZUgUh5s/LJIQ02 ehuPUNJ9maEc8WfDo+ncK68d4AhH1nQr4/Rw0JEpP1JTV6vC/KV45WJsYWbsfvoI 9EXvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm3; bh=5+ZYHCRr4vGKiFv395RRcyJ27V2I1OCjYalYnFwKx rE=; b=sEsJTymfG7a/3tp8TOaUGHlgBzEs2mYHG+tBG9N3V1HTh7xf9mgjRcPEs dOtmqVPo1GBB8nHixXP+GNpTAFdf5xkB/5yu/hY9spVrtZUxv9SWgloNA3+YUIcy F4n+tAQTC6jp+woTyKja/TlWohMUtQWPuJea3mf5YMXALedhAgrQA4q6G0zjpufy yYEhj2t4QGnNvSmHqTdj//vF7sl+O0hZY6pTPZquQmdg5k3D0HOnDD36uWDvYYKi N1i0oyn6TIcMM0FgESF7sOOzgBDNDNMkcAgvUlM3C1wuyCFLRd6R+NJzZWkUMOj1 REu3pa7a2JC5phI9KAsbGjRT5JUjA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeifedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeduudefje etveffhefgudehtdfhvdetkeeiueehfeevveduteekleeuheegudehhfenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejhedrudejvddrhedrvdefudenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgr nhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id E25A230618B7; Sat, 13 Jun 2020 13:58:59 -0400 (EDT) Subject: Re: Fwd: not able to give usage access to public schema To: sekhar chandra Cc: pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <46c038b7-034c-261b-1780-280306558dae@aklaver.com> Date: Sat, 13 Jun 2020 10:58:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/13/20 10:33 AM, sekhar chandra wrote: > Adrian - when I follow the same steps what you did . in my case , the > result is false. > > > grant usage on schema public to role_test ; > GRANT > > SELECT rolname, has_schema_privilege('role_test', 'public', 'usage') > from pg_roles where rolname = 'role_test'; >    rolname  | has_schema_privilege > -----------+---------------------- >   role_test | f > Might be a good time to point out :) : https://www.postgresql.org/docs/12/ddl-schemas.html#DDL-SCHEMAS-PUBLIC " Note that by default, everyone has CREATE and USAGE privileges on the schema public. This allows all users that are able to connect to a given database to create objects in its public schema. " -- Adrian Klaver adrian.klaver@aklaver.com