Do this:
create database "adsf asdf";
Then to a pg_dumpall and you get this:
\connect "adsf asdf"
pg_dump: too many command line options (first is 'asdf')
Try 'pg_dump --help' for more information.
pg_dumpall: pg_dump failed on adsf asdf, exiting
LOG: pq_recvbuf: unexpected EOF on client connection
Chris