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 1jkJXM-0007L8-3v for pgsql-general@arkaria.postgresql.org; Sun, 14 Jun 2020 03:42:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jkJXJ-0007KS-6x for pgsql-general@arkaria.postgresql.org; Sun, 14 Jun 2020 03:42:21 +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 1jkEdZ-0001z4-6C for pgsql-general@lists.postgresql.org; Sat, 13 Jun 2020 22:28:29 +0000 Received: from sonic308-9.consmr.mail.ne1.yahoo.com ([66.163.187.32]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jkEdR-0003an-Ie for pgsql-general@postgresql.org; Sat, 13 Jun 2020 22:28:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1592087297; bh=057w6JQKAsfxhlQBAP9zIUB6zobHg+wsrZ243DP0C8U=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=hmreNru1VEyXjX3aWOOJLc6y76uPoKgKEAGbf2aYIvQ/zjzixRuRfyr8EPuv0fVFXloo2jVQE+o3Oz8U1+bMvzPXqAYIOGQdbLSeGsZ8fHUd7iVu/hoz/F72tJor9VuQY1OQnGVx/uNUKesdSeDSIZtM5jB4vMewKcgirB3EmFonlMfwDR/tF9fc7MJasbrYbyqR1/e81YskFkhd4IcnFEyZkIIMUaCjhMqekaa5BIuN949H9L7oyab/wOvOWqfPctm80DMniogw5jvl9w2FIBRHCHRRxparmTLXwMxORaFlWgHbk6OOL7T96tMMxT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qsM7CCGVgByB_ _KWj0aaL4hoFna_qBgejmqvkn4qNriPM.SlnIg9_Mq947CTQDYpWmeqfazkZ4E.Vdizxyw45BiUV e14bpGYWf26DuKcJRbkMaUEZfngXSahaFOyBTS3ehTZ54DvFzTipOMpIGPVLedauQRfCk6EVbY2p yT50mDCJyEvdNdItGnZHFpE6p0omrbnV0gk94QAhEg.TBZTnVu7YVGB7hqqPqzuoWSiqOBw8obH1 XXzHgxxln2AO5qklzP9Bo2lltw6QqL02OCC1CSnrn33oMAm_Jkz9nD45zSvXxM9v8tOEzhYSVfoe KKW82JHNrezzJ3XwlPQmZcE_J4Xy6EoI6I5UkYLr3eHM- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Sat, 13 Jun 2020 22:28:17 +0000 Date: Sat, 13 Jun 2020 22:28:12 +0000 (UTC) From: Shailesh Rangani To: Adrian Klaver Cc: "sekharclouddbengineer@gmail.com" , "pgsql-general@postgresql.org" Message-ID: <333903254.446847.1592087292982@mail.yahoo.com> In-Reply-To: References: <335825246.427982.1592084341765@mail.yahoo.com> <1033775714.454752.1592085130615@mail.yahoo.com> Subject: Re: postgres issue MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_446846_2035922423.1592087292980" X-Mailer: WebService/1.1.16119 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Content-Length: 17088 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_446846_2035922423.1592087292980 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable \dn+ public=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 List of schemas=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 Name=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2= =A0Owner=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0Access privileges= =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0 =C2=A0 Description--------------= ---------------+---------------+--------------------------------+----------= -------------------------------public rdsadmin dailypay_root=3DUC/rdsadmin = dailypay=3DU/rdsadmin=C2=A0 =C2=A0 standard public schema =20 On Saturday, June 13, 2020, 05:12:32 PM CDT, Adrian Klaver wrote: =20 =20 On 6/13/20 2:52 PM, Shailesh Rangani wrote: > + Community DL. >=20 >=20 >=20 >=20 >=20 > On Saturday, June 13, 2020, 04:39:01 PM CDT, Shailesh Rangani=20 > wrote: >=20 >=20 > Hi Adrian, >=20 > Please find the attached sequence. Please post output of command below as text. What does \dn+ public show? >=20 > Regards > Shailesh >=20 >=20 >=20 >=20 >=20 > ------ Forwarded message --------- >=20 > From: *Adrian Klaver* > > Date: Sat, Jun 13, 2020 at 10:43 AM > Subject: Re: Fwd: not able to give usage access to public schema > To: sekhar chandra > > Cc: > >=20 >=20 >=20 > On 6/13/20 10:33 AM, sekhar chandra wrote: >=C2=A0 > Adrian - when I follow the same steps what you did . in my case ,= the >=C2=A0 > result is false. >=C2=A0 > >=C2=A0 > >=C2=A0 > grant usage on schema public to role_test ; >=C2=A0 > GRANT >=C2=A0 > >=C2=A0 > SELECT rolname, has_schema_privilege('role_test', 'public', 'usag= e') >=C2=A0 > from pg_roles where rolname =3D 'role_test'; >=C2=A0 >=C2=A0 =C2=A0 =C2=A0rolname=C2=A0 | has_schema_privilege >=C2=A0 > -----------+---------------------- >=C2=A0 >=C2=A0 =C2=A0 role_test | f >=20 > Postgres version and where are you running this e.g. cloud service? >=20 > What does \dn+ public show before and after you redo commands as asked > below? >=20 > Can you start over and provide complete sequence for above including > CREATE ROLE and what user you are doing the above as? >=20 >=20 >=20 >=C2=A0 > >=C2=A0 > On Fri, Jun 12, 2020 at 10:11 PM Adrian Klaver >=C2=A0 > =20 > >>=20 > wrote: >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0On 6/12/20 3:56 PM, sekhar chandra wrote: >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > I am not able to give usage permission to p= ublic schema. below >=C2=A0 >=C2=A0 =C2=A0 =C2=A0are the >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > steps. >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > Logged in as super user >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > created a new user as user1 >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > grant usage on public to user1 >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0Either the above is a cut and paste error or y= ou got an error: >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0grant usage on public to role_test ; >=C2=A0 >=C2=A0 =C2=A0 =C2=A0ERROR:=C2=A0 relation "public" does not exist >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0grant usage on schema public to role_test ; >=C2=A0 >=C2=A0 =C2=A0 =C2=A0GRANT >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0SELECT rolname, has_schema_privilege('role_tes= t', 'public', 'usage') >=C2=A0 >=C2=A0 =C2=A0 =C2=A0from pg_roles where rolname =3D 'role_test'; >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rolname=C2=A0 | has_schema_privi= lege >=C2=A0 >=C2=A0 =C2=A0 =C2=A0-----------+---------------------- >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 role_test | t >=C2=A0 > >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > command completed successfully , but verifi= cation statement >=C2=A0 >=C2=A0 =C2=A0 =C2=A0showing he >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > doesnt have usage permission. >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > SELECT rolname, has_schema_privilege(rolnam= e, 'public', 'usage') >=C2=A0 >=C2=A0 =C2=A0 =C2=A0from >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > pg_roles; >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0 > this is strage. what could go wrong. >=C2=A0 > >=C2=A0 > >=C2=A0 >=C2=A0 =C2=A0 =C2=A0-- >=C2=A0 >=C2=A0 =C2=A0 =C2=A0Adrian Klaver >=C2=A0 > adrian.klaver@aklaver.com =20 > > >=C2=A0 > >=20 >=20 > --=20 > Adrian Klaver > adrian.klaver@aklaver.com >=20 > //Datavail/Internal - Limited External Distribution >=20 > This email (including any attachments) is for the use of the intended=20 > recipient(s) only and may contain confidential or proprietary=20 > information. If you have received this email in error, please notify the= =20 > sender immediately and then delete it. If you are not the intended=20 > recipient, you must not keep, use, disclose, copy or distribute this=20 > email without the author's prior permission. //Datavail/Business -=20 > Limited External Distribution --=20 Adrian Klaver adrian.klaver@aklaver.com =20 ------=_Part_446846_2035922423.1592087292980 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
\dn+ public  
      &nbs= p;                     &n= bsp;             List of schemas
&n= bsp;           Name        &nb= sp;    |     Owner     |  &nbs= p;    Access privileges        |   =   Description
-----------------------------+---------------= +--------------------------------+-----------------------------------------=
public=09=09=09rds= admin=09=09dailypay_root=3DUC= /rdsadmin dailypay=3DU/rdsadmin    standard public schema






=20
=20
On Saturday, June 13, 2020, 05:12:32 PM CDT, Adrian Kla= ver <adrian.klaver@aklaver.com> wrote:


On 6/13/20 2:52 PM, Shailesh Rangani = wrote:
> + Community DL.
>
>
>
>
>
> On Saturday, June 13, 2020, 04:39:01= PM CDT, Shailesh Rangani
> <= shailesh.rangani@yahoo.com> wrote:
>
>
> Hi Adrian,
> > Please find the attached sequence.
=
Please post output of command below as text.

What does \dn+ public show?
>
> Regards
>= Shailesh
>
>
>
>
>
&g= t; ------ Forwarded message ---------
>
> From: *Adrian Klaver* <adrian.klaver@aklav= er.com
> <mailto:adrian.kl= aver@aklaver.com>>
> Date: Sat, Jun 13, 2020= at 10:43 AM
> Subject: Re: Fwd: not able to give usag= e access to public schema
> To: sekhar chandra <sekharclouddbengineer@gmail.com
> <mailto:sekharclouddbengineer@gmail.co= m>>
> Cc: <pgsql-g= eneral@postgresql.org <mailto:pgsql-general@p= ostgresql.org>>
>
> >
> On 6/13/20 10:33 AM, sekhar c= handra 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
&g= t;  >
>  > SELECT rolname, has_schema_= privilege('role_test', 'public', 'usage')
>  >= from pg_roles where rolname =3D 'role_test';
>  = >     rolname  | has_schema_privilege
>  > -----------+----------------------
&g= t;  >    role_test | f
>
> Postgres version and where are you running this e.g. cloud s= ervice?
>
> What does \dn+ publi= c show before and after you redo commands as asked
> b= elow?
>
> Can you start over and= provide complete sequence for above including
> CREAT= E ROLE and what user you are doing the above as?
> >
>
>  = >
>  > On Fri, Jun 12, 2020 at 10:11 PM Adr= ian Klaver
>  > <adrian= .klaver@aklaver.com <mailto:adrian.klaver@aklave= r.com>
> <mailto:adrian= .klaver@aklaver.com <mailto:adrian.klaver@aklave= r.com>>>
> wrote:
>=   >
>  >     On 6/12/20= 3:56 PM, sekhar chandra wrote:
>  >  &nb= sp;   > I am not able to give usage permission to public schema. be= low
>  >     are the
>  >      > steps.
>  >      >
>  >=       >
>  >    &n= bsp; > Logged in as super user
>  >  &= nbsp;   > created a new user as user1
>  = >      > grant usage on public to user1
>  >
>  >     Ei= ther the above is a cut and paste error or you got an error:
>  >
>  >     gr= ant usage on public to role_test ;
>  >  =    ERROR:  relation "public" does not exist
>  >
>  >     gran= t usage on schema public to role_test ;
>  >&n= bsp;    GRANT
>  >
>  >     SELECT rolname, has_schema_privilege('r= ole_test', 'public', 'usage')
>  >   = ;  from pg_roles where rolname =3D 'role_test';
>=   >         rolname  | has_schema_pri= vilege
>  >     -----------+---= -------------------
>  >      &= nbsp; role_test | t
>  >
>= ;  >
>  >      >
>  >      > command completed s= uccessfully , but verification statement
>  >&= nbsp;    showing he
>  >   = ;   > doesnt have usage permission.
>  &g= t;      > SELECT rolname, has_schema_privilege(rolname, '= public', 'usage')
>  >     from=
>  >      > pg_roles;
>  >      >
>= ;  >      > this is strage. what could go wrong.<= br clear=3D"none">>  >
>  >
>  >     --
>&nbs= p; >     Adrian Klaver
>  > = adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> <mailto:= adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>
>  &g= t;
>
>
> -= -
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian= .klaver@aklaver.com>
>
> = //Datavail/Internal - Limited External Distribution
> =
> This email (including any attachments) is for the u= se of the intended
> recipient(s) only and may contai= n confidential or proprietary
> information. If you h= ave received this email in error, please notify the
>= sender immediately and then delete it. If you are not the intended
> recipient, you must not keep, use, disclose, copy or distr= ibute this
> email without the author's prior permiss= ion. //Datavail/Business -
> Limited External Distrib= ution
<= br clear=3D"none">

--
Adrian Klaver
adrian.klaver@aklave= r.com
------=_Part_446846_2035922423.1592087292980--