title: How can I extract the values from a record as individual columns in postgresql
body: <p>How can I extract the values from a record as individual comuns in postgresql</p>
  
  <pre><code>SELECT 
  p.*,
  (SELECT ROW(id,server_id,format,product_id) FROM products_images pi WHERE pi.product_id = p.id LIMIT 1) AS image
  
  FROM products p
  
  WHERE p.company = 1 ORDER BY id ASC LIMIT 10
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code>image 
  (3, 4, "jpeg", 7)
  </code></pre>
  
  <p>I would like to have </p>
  
  <pre><code>id | server_id | format | product_id
  3  | 4         | jpeg   | 7
  </code></pre>
  
  <p>Is there any way of selecting only one image for each product and return the columns directly instead of a record?</p>