From: | Neeraj M R <neerajmr12219(at)gmail(dot)com> |
---|---|
To: | Bryn Llewellyn <bryn(at)yugabyte(dot)com> |
Cc: | Tom Lane PostgreSQL <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Restricting user to see schema structure |
Date: | 2022-05-13 05:51:21 |
Message-ID: | CANV4nBEFTSDCK=dtgPpsU7xwO-LjrK4KXDiXqE7b+Pveb=TjdQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Bryn,
What I meant by 'created a new user' is that I have used the following
commands.
CREATE USER <user_name> WITH ENCRYPTED PASSWORD '<password>';
GRANT CONNECT ON DATABASE <database> TO <user_name>;
GRANT USAGE ON SCHEMA <schema> TO <user_name>;
Thanks & Regards
Neeraj
On Fri, May 13, 2022, 10:43 Bryn Llewellyn <bryn(at)yugabyte(dot)com> wrote:
> *neerajmr12219(at)gmail(dot)com <neerajmr12219(at)gmail(dot)com> wrote:*
>
> I am using pgAdmin . I have a database 'db' and it has got 2 schemas
> 'schema1' and 'schema2', I have created some views in schema2 from tables
> of schema1. I have created a new user and granted connection access to
> database and granted usage on tables and views of schema2 only. But now the
> problem is that the new user is able to see the table names of schema1
> even though the user cannot see the data present in them they can see the
> table names. Is there any way I can completely hide schema1 from the new
> user.
>
>
> What exactly do you mean by "have created a new user and granted
> connection access to database"? As I understand it, there's no such thing.
> I mentioned a simple test in my earlier email that showed that any user
> (with no schema of its own and no granted privileges) can connect to any
> database—and see the full metadata account of all its content. I'm teaching
> myself to live with this.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2022-05-13 06:28:46 | Re: Deferred constraint trigger semantics |
Previous Message | Bryn Llewellyn | 2022-05-13 05:13:40 | Re: Restricting user to see schema structure |