title: select all columns from both tables postgresql function
body: <p>i have a simple sql join query</p>
  
  <pre><code>SELECT a.*,b.*
  FROM Orders a
  JOIN Customers b ON a.CustomerID=b.CustomerID
  </code></pre>
  
  <p>which selects all columns from both tables . I need to achieve the same in 
  Postgresql function,but i am not able to select data from 2nd table</p>
  
  <pre><code>CREATE  FUNCTION get_data (p_pattern VARCHAR,p_year INT) 
   RETURNS TABLE (
  orders.*,Customers.*
  ) 
  AS $$
  </code></pre>