Re: PostgreSQL 8.0 bug or my own stupidity?
On Mon, Jul 11, 2005 at 03:41:24PM +0100, Clive Menzies wrote:
> On (11/07/05 15:52), Tom wrote:
> > Hey ho,
> > A couple of days ago, I wanted to start using PostgreSQL instead of
> > MySQL. Figuring Debian packages mostly function properly out of the
> > box, a source installation seemed not worth the trouble, so I apt-get
> > installed postgresql-8.0.
> > Everything seemed fine at first, but when I tried to take the approach
> > with the five steps for the impatient, as described in README.Debian.gz
> > in /usr/share/doc/postgresql-common/, things just won't work out...
> > The second step would be to open a shell for the postgres user, after
> > that, I should "createuser -A -D <my Unix login>", but here's how that
> > goes:
> > [16:44:30 tom ~] su -c "su postgres"
> > Password:
> > [16:44:41 tom ~] createuser -A -D tom
> > createuser: could not connect to database template1: FATAL: user "tom"
> > does not exist
> > [16:44:53 tom ~]
try (as root):
# su - postgres
> Not really answering your question directly nor being in anyway expert
> having just installed postgresql for the first time just recently, I did
> the following as postgres:
> $ psql
> and then created created users using SQL.
> In theory it should work from the command line but I never tried it.
Handy is 'psql dbname -f somefile'
where dbname is your database and somefile holds the SQL commands.
Reproduction if desired may be handled locally. -- rfc3