Apparently, you can write this (an attempt at a convenient workaround
for lack of functional dependency tracking pre-9.1):
SELECT pg_class.* FROM pg_class GROUP BY pg_class.*;
It won't work:
ERROR: 42803: column "pg_class.relname" must appear in the GROUP BY clause or be used in an aggregate function
But the whole thing is a bit confusing. This works (of course):
SELECT pg_class FROM pg_class GROUP BY pg_class;
And this behaves equivalently, apparently:
SELECT pg_class FROM pg_class GROUP BY pg_class.*;
Is there any rhyme or reason for this? I couldn't find anything about
this in the documentation or in the SQL standard. I guess the whole
thing is inconsistent all over the place; I'd just like to verify that
the current behavior is somewhat intentional.