On Jan 27, 2006, at 10:54 , Rich Shepard wrote:
> As user 'postgres' I could invoke psql and tried to create the
> database
> with the command, 'create database contacts username=rshepard'.
> That failed
> with no error message.
Could you provide a sample session, from login to psql to logout? The
added information may give someone on the list more insight into
what's going wrong.
> I exited from psql and user postgres and ran the
> command 'createdb contacts' as me. That worked.
>
> Also, I (as a listed superuser of postgres) cannot run 'psql' and
> get a
> prompt. I'm told, 'psql: FATAL: database "rshepard" does not
> exist'. But, as
> user postgres I can type 'psql' and get into the interactive mode.
Without adding a database to connect to, psql defaults to connect to
a database with the same name as the user. As of PostgreSQL 8.1,
there is a default database named postgres. When use run psql as user
postgres, you should be connecting to the postgres database.
If you specify the database, such as the examples below, you should
be able to connect, or at least giving you another error which will
lead you to find other things that may need tweaking.
psql postgres
psql -d postgres
You may also want to read the release notes (in the documentation or
on the website) to see if there are other changes that may be
unknowingly affecting you.
Hope this helps.
Michael Glaesemann
grzm myrealbox com