"Raymond O'Donnell" <rod(at)iol(dot)ie> writes:
> dropdb -U postgres -W template1
> at the command line, all I get back is "dropdb: database removal
> failed: ERROR: cannot drop the currently open database".
That's because the dropdb command itself connects to template1.
See the article on techdocs.postgresql.org about rebuilding template1
to find out about all the gotchas and workarounds needed to do this.
regards, tom lane