Re: [PATCHES] default database creation with initdb - Mailing list pgsql-hackers

From Andreas Pflug
Subject Re: [PATCHES] default database creation with initdb
Date
Msg-id 42B68E2F.6080806@pse-consulting.de
Whole thread Raw
In response to Re: [PATCHES] default database creation with initdb  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [PATCHES] default database creation with initdb
List pgsql-hackers
Andrew Dunstan wrote:
> 

>>
>>
>> The decision which files should be changed must be taken. e.g. 
>> createdb, dropdb will use template1 hardcoded. Is it acceptable that 
>> those tools fail if the "postgres" database isn't present any more?
>>
>>
> 
> How about template1 as a fallback?

Fallback is a fine idea, but this brings up another problem I'm 
currently facing: how to identify the problem the connection has from 
libpq? If the problem is a wrong password, we certainly don't want to 
try again. I browsed the sources over and over, but apparently there's 
no machine readable return code to distinguish the reason of connection 
failure apart from examining the errormessage string. I have the same 
problem in pgAdmin, where I try to give extended messages like
http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/docs/en_US/hints/conn-listen.html?rev=4056&view=markup

Regards,
Andreas


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] default database creation with initdb
Next
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] default database creation with initdb