Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

postgresql

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.

like image 586
bernie2436 Avatar asked Mar 26 '14 13:03

bernie2436


1 Answers

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.

like image 107
Clodoaldo Neto Avatar answered Nov 15 '22 05:11

Clodoaldo Neto