Re: What Could Cause This Behavior?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: What Could Cause This Behavior?
Дата
Msg-id 20060126175940.W7415@megazone.bigpanda.com
обсуждение исходный текст
Ответ на What Could Cause This Behavior?  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: What Could Cause This Behavior?  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
On Thu, 26 Jan 2006, Rich Shepard wrote:

>    Now that I have postgres-8.1.2 properly configured and running I wanted to
> create a new database for an application. Postgres would not let me -- as a
> user -- create the database, so I su'd to 'postgres'.
>
>    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. I exited from psql and user postgres and ran the

Did you put a semicolon at the end of the command?  I get a
ERROR:  syntax error at or near "username" at character 26
LINE 1: create database contacts username=sszabo
                                 ^
from 8.2 devel.  I would guess owner= is what you were looking for, but
I'm not sure.

>    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.

psql defaults to connecting to a database of the same name as the user
when no database name is given.  Do you get the same if you explicitly try
to connect to a database?

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: What Could Cause This Behavior?
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: What Could Cause This Behavior?