title: Column names from query
body: <p>I'm trying to get make a query to return a list of the column names from a query result in postgresql</p>
  
  <p>e.g.</p>
  
  <pre><code>SELECT column_name 
    FROM ( 
          SELECT table1.* 
            FROM table1 
                 LEFT JOIN table2 
                           ON table1.id = table2.tbl1_id
          )
  </code></pre>
  
  <p>is this possible</p>
  
  <p>I DO NOT WANT THE COLUMNS FROM A SINGULAR TABLE!!! so please dont tell me to do </p>
  
  <pre><code>SELECT column_name
    FROM information_schema.columns
   WHERE table_name = 'table1'
  </code></pre>