Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 590FC1337C50 for ; Wed, 27 Apr 2011 17:06:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 98019-04-7 for ; Wed, 27 Apr 2011 20:05:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from pp-ag1.abag.ca.gov (pp-ag1.abag.ca.gov [198.31.87.11]) by mail.postgresql.org (Postfix) with ESMTP id ECB9213380F5 for ; Wed, 27 Apr 2011 16:44:52 -0300 (ADT) Received: from pps.filterd (pp-ag1 [127.0.0.1]) by pp-ag1.abag.ca.gov (8.14.4/8.14.4) with SMTP id p3RJWWXx018116 for ; Wed, 27 Apr 2011 12:44:52 -0700 Received: from gwia1.abag.ca.gov ([172.16.1.27]) by pp-ag1.abag.ca.gov with ESMTP id vxs2f006r-1 for ; Wed, 27 Apr 2011 12:44:51 -0700 Received: from d02-MTA by gwia1.abag.ca.gov with Novell_GroupWise; Wed, 27 Apr 2011 12:44:51 -0700 Message-Id: <4DB80FC3020000A70001701D@gwia1.abag.ca.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Wed, 27 Apr 2011 12:44:51 -0700 From: "Fred Parkinson" To: , "Kevin Grittner" Subject: Re: Starting psql without a database? References: <4DB7EF0B020000A700017002@gwia1.abag.ca.gov> <4DB801AD020000A700017012@gwia1.abag.ca.gov> <4DB801AD020000A700017012@gwia1.abag.ca.gov> <4DB81F4E020000250003CF57@gw.wicourts.gov> In-Reply-To: <4DB81F4E020000250003CF57@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartCCE03423.0__=" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-04-27_07:2011-04-27, 2011-04-27, 1970-01-01 signatures=0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/242 X-Sequence-Number: 37423 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartCCE03423.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Right you are! 'CREATE DATABASE' worked (started psql with the postgres = database) where createdb didn't. =20 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. =20 Thanks again, Fred =20 >>> "Kevin Grittner" 04/27/2011 11:51 AM >>> "Fred Parkinson" 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 --=__PartCCE03423.0__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML
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&= gt; 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.postgre= sql.org/docs/9.0/interactive/sql-createdatabase.html

-Kevin
<= /DIV> --=__PartCCE03423.0__=--