Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    68

    Unanswered: owner ship change

    hi to all
    pl tell me how to chage owner for my database.

    for example List of databases
    Name | Owner | Encoding
    -----------+----------+-----------
    kala | postgres | SQL_ASCII
    template0 | postgres | SQL_ASCII
    template1 | postgres | SQL_ASCII


    now i want to chage kala database owner.
    i want to change postgres to Administrator .
    pl tell me how to change.
    with example.

    thank u
    bye

  2. #2
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    not implemented yet

    you cannont change the owner of a database
    at the moment with ALTER DATABASE

    I have seen a dicussion about hti son hackers list
    I think it is coming soon.

    You have to dump the the database and change the owner in the dump file.
    and the back into the db server
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  3. #3
    Join Date
    Mar 2004
    Posts
    1

    Re: owner ship change

    From http://www.infodrom.north.de/~joey/Linux/postgresql/ :

    Changing the database owner

    -- Find out the user id (aka usesysid)
    SELECT * FROM pg_user;
    -- Find out the current settings
    SELECT * FROM pg_database;
    -- Now update the owner of the respective database
    UPDATE pg_database SET datdba=YourIDnumber WHERE datname= 'YourDatabase';


    Originally posted by jagan_5378
    hi to all
    pl tell me how to chage owner for my database.

    for example List of databases
    Name | Owner | Encoding
    -----------+----------+-----------
    kala | postgres | SQL_ASCII
    template0 | postgres | SQL_ASCII
    template1 | postgres | SQL_ASCII


    now i want to chage kala database owner.
    i want to change postgres to Administrator .
    pl tell me how to change.
    with example.

    thank u
    bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •