Re: Starting psql without a database?

Поиск
Список
Период
Сортировка
От Fred Parkinson
Тема Re: Starting psql without a database?
Дата
Msg-id 4DB80FC3020000A70001701D@gwia1.abag.ca.gov
обсуждение исходный текст
Ответ на Re: Starting psql without a database?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: Starting psql without a database?
Re: Starting psql without a database?
Список pgsql-admin
Right you are!  'CREATE DATABASE' worked (started psql with the postgres database) where createdb didn't.
 
Was there some way to tell from the documentation that createdb is to run from the shell while CREATE DATABASE is run from the psql prompt?   I assumed all database-related commands are run from the psql prompt.
 
Thanks again, Fred
 

>>> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> 04/27/2011 11:51 AM >>>
"Fred Parkinson" <FredP@abag.ca.gov> wrote:

> I tried using the database 'postgres' which seems to be created
> during the install:
> psql postgres, which takes me to a psql prompt.  However, the
> command createdb -T DEFAULT "timecard" now results in the error
> "syntax error at or neat "createdb" with a carat pointing to the
> 'c' in 'createdb'.

I think you're confusing the OS command-line executable createdb:

http://www.postgresql.org/docs/9.0/interactive/app-createdb.html

and the SQL command CREATE DATABASE:

http://www.postgresql.org/docs/9.0/interactive/sql-createdatabase.html

-Kevin

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

Предыдущее
От: Bob Lunney
Дата:
Сообщение: Re: best practice for moving millions of rows to child table when setting up partitioning?
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Starting psql without a database?