From: | Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE> |
---|---|
To: | s-fery(at)kkt(dot)sote(dot)hu |
Cc: | PostgreSQL list <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: [SQL] database rights? |
Date: | 2000-02-24 16:21:51 |
Message-ID: | Pine.GSO.4.02A.10002241718481.17421-100000@Hummer.DoCS.UU.SE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Graham Vickrage | 2000-02-24 17:08:50 | cache lookup failed |
Previous Message | Giampiero Raschetti | 2000-02-24 12:00:33 | Re: [SQL] PostgreSQL and PHP |