I'm really happy that the PostgreSQL team was able to fix this so quickly and it does appear to be a massive security issue. However, on the flip side, in 13+ years of web development work, I've never really seen a database name beginning with "-".
And to be fair: http://www.shodanhq.com/search?q=mysql
I suspect that's why they weren't able to tell people that if your db port is secure you're safe.
EDIT: No, the problem is in parsing, not the existing names: https://news.ycombinator.com/item?id=5492508