Re: What Could Cause This Behavior?

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What Could Cause This Behavior?
Date: 2006-01-27 02:05:26
Message-ID: C356898B-C120-49EA-B90A-8EE90E54EF9E@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2006-01-27 02:06:26 Re: What Could Cause This Behavior?
Previous Message Ron 2006-01-27 01:55:46 Re: [GENERAL] Creation of tsearch2 index is very