Re: How to set default database

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Krzysztof Walkiewicz <bars0(at)op(dot)pl>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to set default database
Date: 2010-02-04 18:59:57
Message-ID: 4B6B192D.2000305@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/04/2010 10:40 AM, Krzysztof Walkiewicz wrote:
> Hello!
>
> I created database "krzysztof" for practice postgresql. After few days i
> deleted that database and i created the next one "cwiczebna". Now when I
> type "psql" i get strange info, something like: "CRITICAL: base
> "krzysztof" don't exist". Now i need to type "psql cwiczebna" to log in
> to new database. How to set the default database or connect
> automatically to "cwiczebna" database when I type "psql" in terminal. I
> am using Debian Lenny distro.

By default if you do not specify a database psql does -d
'your_username'. If you do not have a database with that name you will
need to specify the database you want to connect to explicitly.

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Mead 2010-02-04 19:03:44 Re: How to set default database
Previous Message Vick Khera 2010-02-04 18:59:02 Re: Need Advice In Improving Database Disc Usage