> ---------------------------------+----------
> pay | postgres
> pay-test | postgres
> pay-test
> /usr/local/pgsql/bi | postgres
It looks to me like this 'second paytest' database is actually named
'pay-test\n/usr/local/pgsql/bi' , possibly created by trying to create a
database without having a closing quote:
User# createdb 'pay-test
(and then beginning to type some /usr/local/pgsql/bin command.)
The command dropdb doesn't seem (at least for me) to work the exact same
way, so the only way I could recover is the following:
(First create the problem)
bash-2.05$ createdb 'blah
> this is a test'
CREATE DATABASE
bash-2.05$ psql -l
List of databases
Name | Owner
---------------------+----------
blah
this is a test | pg721tmp
quickview | pg721tmp
template0 | pg721tmp
template1 | pg721tmp
(4 rows)
template1=# update pg_database set datname='foo' where datname like 'blah%';
UPDATE 1
bash-2.05$ psql -l
List of databases
Name | Owner
-----------+----------
foo | pg721tmp
quickview | pg721tmp
template0 | pg721tmp
template1 | pg721tmp
(4 rows)
-ron