In a postgresql connection string an empty value or a value with spaces in it needs to be surrounded with single quotes - e.g. user=steve password='' dbname=whatever.
If, say, the password is blank then without those quotes user=steve password= dbname=whatever will use "dbname=whatever" as the password and end up connecting to the default database, rather than the expected temporary one.