Received: from eater.zotnet.com (IDENT:root@216-99-218-131.dsl.aracnet.com [216.99.218.131]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA67277 for ; Mon, 6 Mar 2000 23:47:39 -0500 (EST) (envelope-from zot@zotconsulting.com) Received: from zotconsulting.com (zot@mp.zotnet.com [216.99.218.134]) by eater.zotnet.com (8.8.7/8.8.7) with ESMTP id VAA04010; Mon, 6 Mar 2000 21:05:32 -0800 Sender: zot@eater.zotnet.com Message-ID: <38C489D9.8B286BD7@zotconsulting.com> Date: Mon, 06 Mar 2000 20:47:21 -0800 From: "Zot O'Connor" Organization: Zot Consulting X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-general@postgresql.org, postgres sql Subject: change owner of database -- answer Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This was posted several times as a question, here is the answer that I used: use createdb from whereever... \d pg_database Table = pg_database +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | datname | name | 32 | | datdba | int4 | 4 | | encoding | int4 | 4 | | datpath | text | var | +----------------------------------+----------------------------------+-------+ => select * from pg_database; datname |datdba|encoding|datpath -----------+------+--------+----------- template1 | 124| 0|template1 mydatabase | 124| 0|mydatabase I then sent UPDATE pg_database SET datdba=99 WHERE datname=mydatabase; And it updated the owner of the DB. This area needs documentation! -- Zot O'Connor http://www.ZotConsulting.com http://www.WhiteKnightHackers.com