Re: How to allow other users create databases ? - Mailing list pgsql-novice

From Oliver Elphick
Subject Re: How to allow other users create databases ?
Date
Msg-id 200108251759.f7PHxVoa025745@linda.lfix.co.uk
Whole thread Raw
In response to How to allow other users create databases ?  (Peter Moscatt <pmoscatt@bigpond.net.au>)
List pgsql-novice
Peter Moscatt wrote:
  >I have recently sucsessfully installed PostgreSQL onto my Linux system.
  > I installed it under the user name of 'postgres' and able to create
  >databases Ok.
  >
  >But when logged in as my normall user account 'pmoscatt' then try to
  >create/manage databases I get an error message indicating that I don't
  >have the permission to do so and that I am not in the catalogue of users
  >to do so.
  >
  >How can I fix this ?

It sounds as though you have not created a PostgreSQL user for yourself.
That is separate from your system id.

Log in as postgres; then:

$ createuser pmoscatt

or connect to the database as postgres, then

CREATE USER pmoscatt CREATEDB;



If I have misunderstood and you have already created the user, add database
creation privilege by doing this (when connected as postgres):

ALTER USER pmoscatt CREATEDB;

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "But the day of the Lord will come as a thief in the
      night. The heavens shall pass away with a great noise,
      and the elements shall melt with fervent heat, and the
      earth and the works that are therein shall be burned
      up."                     II Peter 3:10



pgsql-novice by date:

Previous
From:
Date:
Subject: Re: Creating a Database Other Applications Can Use ?
Next
From: Justin Clift
Date:
Subject: New FAQ : FAQ: Working with Dates and Times in PostgreSQL