[Babase] Allowing others to use your tables in the sandbox
Karl O. Pinc
babase@www.eco.princeton.edu
Thu, 06 Oct 2005 05:47:42 +0000
Hi,
Although anybody can create anything in the sandbox,
only the creator has any rights to the object
created. So, when Leah makes a table, only she
can SELECT it or put data in it, etc.
The way around this is to use the GRANT
statement.
http://www.postgresql.org/docs/8.0/static/sql-grant.html
After creating a table "foo", grant other's privileges
as follows:
GRANT ALL ON foo TO GROUP babase_editors;
GRANT SELECT ON foo TO GROUP babase_readers;
There is one other issue. Only the creator of the
table can change it's structure -- to add another
column, change the table name, etc. And only
the creator can destroy (DROP) the table.
We can worry about this when it's a problem,
but the two solutions now are to have another
person copy the data into a new table that they
modify, and then have me delete the original table;
or to just have me do all of it.
Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein