FATAL: no such database - Mailing list pgsql-novice

From BeeRich Lists
Subject FATAL: no such database
Date
Msg-id AB678941-ED2D-49BF-9EF5-919A2D8538F3@gmail.com
Whole thread Raw
Responses Re: FATAL: no such database
List pgsql-novice
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




pgsql-novice by date:

Previous
From: Jean Baro
Date:
Subject: Re: Best practices for preparing an application to (possibly) be sharded (FDW) in the future?
Next
From: Tom Lane
Date:
Subject: Re: FATAL: no such database