"Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> writes:
> 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
Hmm, I wonder if this could be a corrupt-index problem. If you
try "select * from pg_database where datname = 'stdb'", do you
get a row? Does "REINDEX pg_database" help?
regards, tom lane