Don't trim excess whitespace in columns_for_distinct in pg

Includes test from #16649