Skip site navigation (1) Skip section navigation (2)

Re: psql: FATAL: Database "postgres" does not exist in

From: Chris Mair <chrisnospam(at)1006(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: psql: FATAL: Database "postgres" does not exist in
Date: 2006-08-15 23:52:45
Message-ID: 1155685965.28246.6.camel@dell.home.lan (view raw or flat)
Thread:
Lists: pgsql-admin
> Sorry to bother everyone with this, but I tried searching the site and
> the archive to no avail. I have read the docs and can't seem to get
> this ironed out. I get the error "psql: FATAL:  Database "postgres"
> does not exist in the system catalog." when trying to start a psql
> session. This tells me that my install in not complete. I reread the
> the post install instructions and can't see anything obvious that says
> I missed something.

If you run psql without a database name as an option, it tries to
connect to a database with the same name as the $USER psql runs as.

So if you run it as user "postgres", and a db with that name does
not exist (yet), it will complain.

You should first create a database using "createdb somename" and then
connect with "psql somename".

Note you can get a list of available databases with psql -l.

>  
> Any help is appreciated.
>  
> Thanks
>  
> John Vandervliet


Bye,
Chris.

 
-- 

Chris Mair
http://www.1006.org



In response to

pgsql-admin by date

Next:From: Kis János TamásDate: 2006-08-16 05:35:26
Subject: Re: psql: FATAL: Database "postgres" does not exist in the
Previous:From: Sriram DandapaniDate: 2006-08-15 23:00:33
Subject: Re: dropping partitioned table waits forever

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group