Re: How to change the pgsql source code and build it?? - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: How to change the pgsql source code and build it??
Date
Msg-id 53A23F05.7030505@2ndquadrant.com
Whole thread Raw
In response to Re: How to change the pgsql source code and build it??  (Shreesha <shreesha1988@gmail.com>)
List pgsql-hackers
On 06/19/2014 01:50 AM, Shreesha wrote:

> However in my case, I don't know why there wasn't a default database
> with name 'root' got created or why the server rejects the client when
> it tries to connect to the default database. 

Take a look at the initdb manual, the tutorial, and the
installation/system administration documentation.

> Can anyone shed some light on 
> 1) when the default database gets created

By initdb - see the initdb manual.

> 2) how is this database 'name' is decided? Or what is the name of the
> default database name?

See the initdb manual.

> 3) Is there any other places in the database server code where this
> check is applied?

Wherever you connect, libpq picks the default database = the current
username.

> Upon looking at the error I got, I believe the code is searching for the
> database name == user name.  If anyone can give some input on the code,
> it would be helpful!

libpq


I think you probably need to move this to pgsql-general, Stack Overflow,
etc. It's not really on topic for pgsql-hackers.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: David G Johnston
Date:
Subject: Re: idle_in_transaction_timeout
Next
From: Matheus de Oliveira
Date:
Subject: Re: How about a proper TEMPORARY TABLESPACE?