Re: Test database for new installs? - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: Test database for new installs?
Date
Msg-id Pine.LNX.4.58.0411190919180.5262@linuxworld.com.au
Whole thread Raw
In response to Re: Test database for new installs?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 18 Nov 2004, Tom Lane wrote:

> Josh Berkus <josh@agliodbs.com> writes:
> > Some issues have come up repeatedly on IRC with new users, enough so that they
> > might be worth addressing in the code:
> > a) new users try just to "psql" as postgres, and get a "no such database
> > postgres";
> > b) new users use template1 as a testing database, and then have to re-initdb
> > to clean it up.
>
> I think this is a documentation thing as much as anything else.  We
> could just suggest that the first move after starting the postmaster be
>     createdb
> (they don't even need to give it an argument ... how painless can you
> get?)

Perhaps initdb could spit out a line saying 'to create a test database for
the current user, issue /path/to/createdb'.

*thinks* I don't think it solves the problem Josh and others are seeing on
IRC though. From my experience, at least with reference to (a) above,
the user's OS comes with PostgreSQL installed or allows it to be installed
in some semi-automated way. Generally, the installation process runs
initdb in the background (which is a broken idea in my opinion). An
run level init script brings up the server and the user wants to connect.

It seems as though, if the distribution wants to make it this simple for a
user to get at an SQL console, then they should also create default
databases for users. My personal opinion is, however, that the
administrator of the machine should be forced to initdb which will force
he or her to read at least some of the manual.

Gavin


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: OpenBSD/Sparc status
Next
From: Tom Lane
Date:
Subject: Re: OpenBSD/Sparc status