pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Vogel <paul.vogel@deadeyesoftware.com>
To: pgsql-admin@postgresql.org
Subject: A question about differences between createdb and "create database"
Date: Mon, 13 Feb 2006 12:27:16 -0700
Message-ID: <43F0DD94.8080204@deadeyesoftware.com> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <43F0DD94.8080204@deadeyesoftware.com>
Permalink:  ../43F0DD94.8080204@deadeyesoftware.com/
Also on:    postgresql.org/message-id/43F0DD94.8080204@deadeyesoftware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: paul.vogel@deadeyesoftware.com
  Subject: Re: A question about differences between createdb and "create database"
  In-Reply-To: <43F0DD94.8080204@deadeyesoftware.com>
  References: <43F0DD94.8080204@deadeyesoftware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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