Re: [SQL] Grants

From: "Ezequias Rodrigues da Rocha" <ezequias(dot)rocha(at)gmail(dot)com>
To: "Melvin Davidson" <mdavidson(at)cctus(dot)com>
Cc: imad <immaad(at)gmail(dot)com>, Pgadmin-Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: [SQL] Grants
Date: 2006-12-04 17:08:24
Message-ID: 55c095e90612040908i5b0b7f10gfcff3a0c13774eeb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-sql

Thank you so much. Now everything is ok.

My real best regards
Ezequias Rodrigues da Rocha

2006/12/2, Melvin Davidson <mdavidson(at)cctus(dot)com>:
> Look at your script.
>
> Your syntax is backward.
> > GRANT administradores TO ezequias;
>
>
> Also, you must create the administradores role _BEPORE_ you grant to it/
> It should be:
> CREATE ROLE administradores
> NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
>
> GRANT ezequias TO administradores ;
>
> That should fix the problem.
>
>
> -----Original Message-----
> From: pgadmin-support-owner(at)postgresql(dot)org [mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of Ezequias Rodrigues da Rocha
> Sent: Friday, December 01, 2006 7:04 AM
> To: imad
> Cc: Pgadmin-Support; pgsql-sql(at)postgresql(dot)org
> Subject: Re: [pgadmin-support] [SQL] Grants
>
> ####Schema grants####
>
> CREATE SCHEMA base
> AUTHORIZATION root;
> GRANT ALL ON SCHEMA base TO root;
> GRANT USAGE ON SCHEMA base TO administrators;
>
> ####Table grants####
> GRANT ALL ON TABLE base."local" TO root; GRANT SELECT, UPDATE, INSERT ON TABLE base."local" TO administrators;
>
> Still the same problem. :(
>
> 2006/11/30, imad <immaad(at)gmail(dot)com>:
> > You did not grant access privileges to schema.
> > Also GRANT administrators on the base schema as you did for the table.
> >
> > --Imad
> > www.EnterpriseDB.com
> >
> >
> > On 12/1/06, Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)com> wrote:
> > > Hi list,
> > >
> > > I am having problem with grants and users on PostgreSQL.
> > >
> > > I am using pgAdmin to connect like other user to test my permissions.
> > >
> > > As the owner of the database I have criated two roles:
> > >
> > > administrators (cannot connect)
> > > ezequias (can connect)
> > >
> > > I give permissions to a table I have:
> > > GRANT SELECT, UPDATE, INSERT ON TABLE base.table1 TO administrators;
> > >
> > >
> > > My user:
> > > CREATE ROLE ezequias LOGIN
> > > NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; GRANT
> > > administradores TO ezequias;
> > >
> > > My group
> > >
> > > When I try to access the table base.table1 with ezequias login the
> > > pgAdmin reports:
> > > (see attached image)
> > >
> > > Could someone tell me what I did wrong ?
> > > Ezequias
> > >
> > >
> > >
> > > ---------------------------(end of
> > > broadcast)---------------------------
> > > TIP 5: don't forget to increase your free space map settings
> > >
> > >
> > >
> > >
> >
>
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Atenciosamente (Sincerely)
> Ezequias Rodrigues da Rocha
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> A pior das democracias ainda é melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Bob Pawley 2006-12-04 17:33:26 Fw: PG Admin
Previous Message Bob Pawley 2006-12-04 17:01:31 Version 1.6.1

Browse pgsql-sql by date

  From Date Subject
Next Message George Pavlov 2006-12-05 00:33:19 null values in non-nullable column
Previous Message Richard Broersma Jr 2006-12-04 16:48:25 Re: Using Control Flow Functions in a SELECT Statement