V8.2.0 on Linux
Can’t rename a db, complains that it doesn’t exist. Yet psql –l shows that it does and I can connect to it ???
mmdcc228_SETUP(120)% psql stdb2 -c "alter database stdb rename to stdb_tmp"
ERROR: database "stdb" does not exist
mmdcc228_SETUP(121)% psql -l
List of databases
Name | Owner | Encoding
--------------+----------+----------
cells | dfgauthi | UTF8
cells_dev | dfgauthi | UTF8
postgres | dfgauthi | UTF8
stdb | dfgauthi | UTF8
stdb2 | dfgauthi | UTF8
stdb_standby | dfgauthi | UTF8
template0 | dfgauthi | UTF8
template1 | dfgauthi | UTF8
(8 rows)
mmdcc228_SETUP(122)% psql stdb
Welcome to psql 8.2.0, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
stdb=#