Thread: User creation of DB

User creation of DB

From
pocm@rnl.ist.utl.pt (Paulo J. Matos)
Date:
Hi all,

I've just installed Postgresql, I've created a db using user
postgres, but how can I give a user permissions to create one
too...
Since, when I do:
pdestroy@localhost:~$ createdb test
psql: FATAL 1:  user "pdestroy" does not exist
createdb: database creation failed

Any ideas?

Best regards,

--
Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
Instituto Superior Tecnico - Lisbon
Software & Computer Engineering - A.I.
 - > http://www.rnl.ist.utl.pt/~pocm
 ---
    Yes, God had a deadline...
        So, He wrote it all in Lisp!

Re: User creation of DB

From
"Nick Fankhauser"
Date:
Paulo-

There are two ways to accomplish this. When you create the user, you can
type: "create user pdestroy createdb". Or now that the user has already been
created, do this: "alter user pdestroy  createdb" Look here for more info:

http://www.postgresql.org/idocs/index.php?sql-createuser.html

http://www.postgresql.org/idocs/index.php?sql-alteruser.html

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Paulo J. Matos
> Sent: Monday, January 14, 2002 12:29 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] User creation of DB
>
>
> Hi all,
>
> I've just installed Postgresql, I've created a db using user
> postgres, but how can I give a user permissions to create one
> too...
> Since, when I do:
> pdestroy@localhost:~$ createdb test
> psql: FATAL 1:  user "pdestroy" does not exist
> createdb: database creation failed
>
> Any ideas?
>
> Best regards,
>
> --
> Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
> Instituto Superior Tecnico - Lisbon
> Software & Computer Engineering - A.I.
>  - > http://www.rnl.ist.utl.pt/~pocm
>  ---
>     Yes, God had a deadline...
>         So, He wrote it all in Lisp!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>