Re: How to set default database

From: Scott Mead <scott(dot)lists(at)enterprisedb(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 19:03:44
Message-ID: d3ab2ec81002041103u41acd6c4ud2c2f52610264b4f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 4, 2010 at 1:40 PM, Krzysztof Walkiewicz <bars0(at)op(dot)pl> 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.
>

Setup the 'PGDATABASE' environment variable

http://www.postgresql.org/docs/current/interactive/libpq-envars.html

--Scott

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-02-04 19:13:17 Re: Verify a record has a column in a plpgsql trigger
Previous Message Adrian Klaver 2010-02-04 18:59:57 Re: How to set default database