Received: from meryl.it.uu.se (root@meryl.it.uu.se [130.238.12.42]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA16959 for ; Thu, 24 Feb 2000 11:21:59 -0500 (EST) (envelope-from e99re41@DoCS.UU.SE) Received: from Hummer.DoCS.UU.SE (e99re41@Hummer.DoCS.UU.SE [130.238.9.175]) by meryl.it.uu.se (8.8.5/8.8.5) with ESMTP id RAA27923; Thu, 24 Feb 2000 17:21:55 +0100 (MET) Received: from localhost (e99re41@localhost) by Hummer.DoCS.UU.SE (8.6.12/8.6.12) with SMTP id RAA17989; Thu, 24 Feb 2000 17:21:52 +0100 X-Authentication-Warning: Hummer.DoCS.UU.SE: e99re41 owned process doing -bs Date: Thu, 24 Feb 2000 17:21:51 +0100 (MET) From: Peter Eisentraut Reply-To: Peter Eisentraut To: s-fery@kkt.sote.hu cc: PostgreSQL list Subject: Re: [SQL] database rights? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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