Re: How to change the default database for a user

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to change the default database for a user
Date: 2006-01-30 17:11:55
Message-ID: 87d5i9abdw.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alexander Farber <alexander(dot)farber(at)gmail(dot)com> writes:

> Hello,
>
> I've created a user and a database both wrongly named "phpbb".
> After that I have renamed both to "punbb" using "ALTER DATABASE"
> and "ALTER USER". Now everything works fine, except I always
> have to specify the database when connecting (both using psql or
> the PQconnectdb() from my C-program):
>
> h754814:afarber {103} psql -U punbb
> psql: FATAL: database "phpbb" does not exist

psql uses your Unix username as the default database if you don't
specify one.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rlee0001 2006-01-30 17:49:05 8.0.3 regexp_replace()...
Previous Message Alexander Farber 2006-01-30 17:02:58 How to change the default database for a user