PostGres Error When Using Distinct : postgres ERROR: could not identify an ordering operator for ty
- by CaffeineIV
** EDIT **
Nevermind, just needed to take out the parens...
I get this error: ERROR: could not identify an ordering operator for type record
when trying to use DISTINCT
Here's the query:
select DISTINCT(g.fielda, g.fieldb, r.type)
from fields g LEFT JOIN types r ON g.id = r.id;
And the errors:
ERROR: could not identify an ordering operator for type record
HINT: Use an explicit ordering operator or modify the query.
********** Error **********
ERROR: could not identify an ordering operator for type record
SQL state: 42883
Hint: Use an explicit ordering operator or modify the query.