For some reason I cannot create a database. I use Sequel, Postico, and psql, and all three won’t create a database.
Thefirst two write the syntax for me, and they too return errors. Here is an example in psql:
rich=# CREATE DATABASE alpha;
CREATE DATABASE
rich=# \c alpha;
FATAL: no such database: alpha
Previous connection kept
rich=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+-------+----------+-------------+-------------+-------------------
alpha | rich | UTF8 | C | C |
postgres | rich | UTF8 | C | C |
rich | rich | UTF8 | C | C |
template0 | rich | UTF8 | C | C | =c/rich +
| | | | | rich=CTc/rich
template1 | rich | UTF8 | C | C | =c/rich +
| | | | | rich=CTc/rich
(5 rows)
rich=# DROP DATABASE alpha;
DROP DATABASE
rich=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+-------+----------+-------------+-------------+-------------------
postgres | rich | UTF8 | C | C |
rich | rich | UTF8 | C | C |
template0 | rich | UTF8 | C | C | =c/rich +
| | | | | rich=CTc/rich
template1 | rich | UTF8 | C | C | =c/rich +
| | | | | rich=CTc/rich
(4 rows)
rich=# CREATE DATABASE alpha;
CREATE DATABASE
rich=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+-------+----------+-------------+-------------+-------------------
alpha | rich | UTF8 | C | C |
postgres | rich | UTF8 | C | C |
rich | rich | UTF8 | C | C |
template0 | rich | UTF8 | C | C | =c/rich +
| | | | | rich=CTc/rich
template1 | rich | UTF8 | C | C | =c/rich +
| | | | | rich=CTc/rich
(5 rows)
rich=# \c alpha;
FATAL: no such database: alpha
Previous connection kept
rich=#
I have reinstalled PostgreSQL 12 both through homebrew as well as using the Postgres.app on MacOS. Both have the same
issue.
Anybody have any insight into what I should try? Thanks for your time.
Cheers, Bee