Thank you Tom, you were right. I needed to group by all the columns:
reldatabase, reltablespace, relforknumber too. Now all of them are unique.
Thank you for clearing this out :)
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html