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

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 (view raw or flat)
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

pgsql-general by date

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

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