Re: createdb: could not connect

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: createdb: could not connect
Дата
Msg-id 16959.1174853601@sss.pgh.pa.us
обсуждение исходный текст
Ответ на createdb: could not connect  ("stephenc" <mail@xesoftware.com.au>)
Список pgsql-novice
"stephenc" <mail@xesoftware.com.au> writes:
> postgres=# makedb mydb
> postgres-#

The reason that doesn't work is that (1) makedb is not a SQL command
in Postgres, and (2) since you didn't type a semicolon, psql thinks
the command is incomplete and is waiting for you to type another line
of command.  You would have gotten a syntax error when you did enter
a semicolon, because the right command syntax is "CREATE DATABASE mydb;"

> I think this is something to do with the password, but now I am lost.  Can
> someone tell me how to set the password?  Incidentally, I never created a
> user stephenc.  That is just the name of my user account on the xp box.

You seem to be able to get into psql OK, so it's not clear to me why
createdb didn't work.  Perhaps you specified a -U option to psql but
forgot it for createdb?

            regards, tom lane

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

Предыдущее
От: "stephenc"
Дата:
Сообщение: createdb: could not connect
Следующее
От: Tim Bowden
Дата:
Сообщение: ER diagrams