Nope, as long as it redirects, you don't lose your Google ranks :)
301 redirects are super cool awesome sauce because it lets you keep your ranking, AND have uber simple, pretty URLs :)
The trick, and yes there is one, is that the 'postname' you redirect FROM has to be the same you redirect TO.
I use this a lot of the time when changing permalinks from domain.com/YYYY/MM/DD/postname to just domain.com/postname -- or in my case, domain.com/YYYY/postname, since I think people like years). And WordPress is even extra cool because if I go to domain.com/postname it, on it's own, will go 'Oh you mean domain.com/YYYY/postname! Here you go!'