On Thu, Mar 1, 2012 at 11:38 AM, Eric Ndengang
<eric.ndengang_fo...@affinitas.de> wrote:
> Hi
> You can try this command "REASSIGN OWNED BY .... TO ..." like this:
> REASSIGN OWNED BY previous_role TO new_role;
>  DROP OWNED previous_role;

I did as follows:

iamunix=# \c postgres
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
You are now connected to database "postgres" as user "carlos".
postgres=# REASSIGN OWNED BY carlos TO lauren;
REASSIGN OWNED
postgres=# DROP OWNED BY carlos;
DROP OWNED

iamunix=# \d
               List of relations
 Schema |       Name       |   Type   | Owner
--------+------------------+----------+--------
 public | dept             | table    | carlos
 public | dept_id_seq      | sequence | carlos
 public | employees        | table    | carlos
 public | employees_id_seq | sequence | carlos
 public | manager_lookup   | view     | carlos
 public | managers         | table    | carlos
 public | managers_id_seq  | sequence | carlos

That didn't work for some reason but mostly because I don't follow the
concept of what's being done. I've now since changed the database role
owner back to Carlos so now 'Carlos' owns both the database and all of
it's tables. Can we start fresh and assume I just got the request to
change the specified database and all of it's tables, sequences,
views, & triggers to Lauren?

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to