Re: [SQL] database rights? - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: [SQL] database rights?
Date
Msg-id Pine.GSO.4.02A.10002241718481.17421-100000@Hummer.DoCS.UU.SE
Whole thread Raw
In response to database rights?  (Engard Ferenc <fery@pons.sote.hu>)
List pgsql-sql
On Thu, 24 Feb 2000, Engard Ferenc wrote:

> When I create a table, what depends that I can do it on? And, what
> permissions will be create the new table with?

Only the creator will be able to do anything with the table.

> Ie, I have a database, and I want to access it with two users, and
> one of them can create tables, but the newly created tables should be
> accessed by the other user by default.

GRANT {SELECT|UPDATE|etc} TO other_user;

> And what if I want to create tables with two users in it?

If you mean two owners, you can't.

> With the 'createuser' command it asks whether I want to create a new
> database for the new user, and warns 'don't forget to create a
> database for almafa' if I don't create. How can I do it later, or
> change the owner of a database/table?

I don't know where this idea "one database per user" came from, but most
of the time you don't really want to do that. To create databases, use
CREATE DATABASE.

> As long as I see, the grant/revoke works only for tables... Can I set
> it to rows maybe...? Or should I create views for that?

Not yet and Yes.


-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-sql by date:

Previous
From: Giampiero Raschetti
Date:
Subject: Re: [SQL] PostgreSQL and PHP
Next
From: "Graham Vickrage"
Date:
Subject: cache lookup failed