pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
A question about differences between createdb and "create database"
2+ messages / 2 participants
[nested] [flat]

* A question about differences between createdb and "create database"
@ 2006-02-13 19:27 Paul Vogel <paul.vogel@deadeyesoftware.com>
  2006-02-18 06:02 ` Re: A question about differences between createdb and "create database" Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Paul Vogel @ 2006-02-13 19:27 UTC (permalink / raw)
  To: pgsql-admin

I have a pg_dump of a database (without autocreation lines)  that I 
tried loading by using the commands:
     createdb -T template0 -U postgres database; psql -U postgres 
database < filename

 I couldn't get it to connect via ODBC.  But when I added the following 
lines in the source file:

    CREATE DATABASE "database" WITH TEMPLATE = template0 ENCODING = 
'SQL_ASCII';
    ALTER DATABASE "database" OWNER TO postgres;
    \connect "database"

And loaded it with the command "psql -U postgres template1 < fileanme" 
the resultant database worked fine with ODBC.  So something is 
apparently different between the command line "createdb" command and the 
"create database" command.  Has anybody else run into this?  And if so, 
are there any other problems I should be aware of?  Or did I miss an 
option of the "createdb" line?

Thanks,
Paul
    PS - I'm currently running PostgreSQL 8.1.2 under Linux Fedora Core 2




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: A question about differences between createdb and "create database"
  2006-02-13 19:27 A question about differences between createdb and "create database" Paul Vogel <paul.vogel@deadeyesoftware.com>
@ 2006-02-18 06:02 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2006-02-18 06:02 UTC (permalink / raw)
  To: Paul Vogel <paul.vogel@deadeyesoftware.com>; +Cc: pgsql-admin

Paul Vogel <paul.vogel@deadeyesoftware.com> writes:
> So something is 
> apparently different between the command line "createdb" command and the 
> "create database" command.

Not a lot ... createdb just runs psql to issue a create database
command.  One possibility is that you gave createdb a mixed-case
database name, because it will double-quote the name before passing
it on to create database.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-02-18 06:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 19:27 A question about differences between createdb and "create database" Paul Vogel <paul.vogel@deadeyesoftware.com>
2006-02-18 06:02 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox