bernie2436
bernie2436

Reputation: 23901

Createdb does not create a db in postgres: no error message

When I try to create a db in postgres 9.3, it does not create the database. I do not get any error messages.

abramhandler-# createdb orleansgis
abramhandler-# \list
                                         List of databases
     Name     |    Owner     | Encoding |   Collate   |    Ctype    |       Access privileges       
--------------+--------------+----------+-------------+-------------+-------------------------------
 abramhandler | abramhandler | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres     | abramhandler | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0    | abramhandler | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/abramhandler              +
              |              |          |             |             | abramhandler=CTc/abramhandler
 template1    | abramhandler | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/abramhandler              +
              |              |          |             |             | abramhandler=CTc/abramhandler
(4 rows)

abramhandler-# 

I tried entering #commit and it still does not show the database.

The docs show how to debug error messages -- but I'm not sure what to do when I get no error message at all. It simply does not create the database.

Upvotes: 5

Views: 4828

Answers (1)

Clodoaldo Neto
Clodoaldo Neto

Reputation: 125214

createdb is a shell command line command. At the psql client prompt use the create database command

When the prompt is -# it is still waiting for the command termination, a semicolon. Enter Ctrl C to escape that.

Upvotes: 12

Related Questions