title: PostgreSQL error: subquery must return only one column
body: <p>Using PostgreSQL-9.1 and PostGIS 2.0.1, when doing a SELECT query containing a sub-query that returns multiple columns, I am getting the error <code>subquery must return only one column</code>.</p>
  
  <p>How can the query/subquery be modified to return multiple columns?</p>
  
  <p><strong>Query</strong></p>
  
  <pre><code>SELECT l.id, l.lat, l.lng, l.geom,
          (SELECT g.id, g.lat, g.lng, ST_Distance(l.geom, g.geom)
          FROM stage.dogs as g
          LIMIT 1)
  
  FROM stage.users As l
  </code></pre>
  
  <hr>
  
  <p><strong>Full Query</strong></p>
  
  <pre><code>SELECT l.id, l.lat, l.lng, l.geom,
      g.id, g.lat, g.lng, ST_Distance(l.geom, g.geom) 
  FROM stage.users As l
  CROSS JOIN (SELECT *
      FROM stage.dogs as g
      ORDER BY g.geom &lt;-&gt; l.geom 
      LIMIT 1) as g
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>ERROR: invalid reference to FROM-clause entry for table "l"
  SQL state: 42P01
  Hint: There is an entry for table "l", but it cannot be referenced from this part of the query.
  </code></pre>