Connecting without specifying a database

From: Murray Cumming <murrayc(at)murrayc(dot)com>
To: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Connecting without specifying a database
Date: 2005-02-10 11:50:23
Message-ID: 1108036223.3706.12.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Can PQconnectdb(), or something else, be used without specifying the
dbname in the connection string? I want to connect just so that I can
create a database that does not exist yet.

When I don't specify the dbname, PQconnectdb() tries to connect to a
database with the same name as the user, and then complains that it does
not exist. Is it really necessary for each user to have an empty
database like this?

--
Murray Cumming
murrayc(at)murrayc(dot)com
www.murrayc.com
www.openismus.com

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Robert Treat 2005-02-10 13:12:08 Re: Connecting without specifying a database
Previous Message Francisco Figueiredo Jr. 2005-02-10 11:34:04 Function return number of affected rows