From: Peter Eisentraut <e99re41@DoCS.UU.SE>
To: s-fery@kkt.sote.hu
Cc: PostgreSQL list <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] database rights?
Date: Thu, 24 Feb 2000 17:21:51 +0100 (MET)
Message-ID: <Pine.GSO.4.02A.10002241718481.17421-100000@Hummer.DoCS.UU.SE> (raw)
In-Reply-To: <Pine.LNX.4.02.10002240858270.224-100000@domesticus.sote.hu>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: e99re41@DoCS.UU.SE, s-fery@kkt.sote.hu
Subject: Re: [SQL] database rights?
In-Reply-To: <Pine.GSO.4.02A.10002241718481.17421-100000@Hummer.DoCS.UU.SE>
References: <Pine.LNX.4.02.10002240858270.224-100000@domesticus.sote.hu> <Pine.GSO.4.02A.10002241718481.17421-100000@Hummer.DoCS.UU.SE>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox