Florian Weimer <fweimer@bfk.de> writes:
> For each value in the first column, I need one (and only one) matching
> row from the table. A possible solution is:
SELECT DISTINCT ON would do it, if you don't mind a non-portable solution.
regards, tom lane