title: PostGres Error When Using Distinct : postgres ERROR: could not identify an ordering operator for type record
body: <p>** EDIT **</p>
  
  <p>Nevermind, just needed to take out the parens... </p>
  
  <p>I get this error: ERROR:  could not identify an ordering operator for type record
  when trying to use DISTINCT</p>
  
  <p>Here's the query: </p>
  
  <pre><code>select DISTINCT(g.fielda, g.fieldb, r.type) 
  from fields g LEFT JOIN types r ON g.id = r.id;
  </code></pre>
  
  <p>And the errors:</p>
  
  <pre><code>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.
  </code></pre>