title: Create dynamic table from function in PostgreSQL
body: <p>I have table data,</p>
  
  <pre><code>select * from tbltaxamount ;
   id |   taxname   | taxinfoid | taxvalue | taxamt | zoneid | invoiceid | transid 
  ----+-------------+-----------+----------+--------+--------+-----------+---------
    1 | Service Tax |         0 |     0.00 |  28.69 |      2 |       119 |      -1
    2 | ABC Tax     |         0 |     0.00 |  25.78 |      2 |       119 |      -1
  </code></pre>
  
  <p>Now, how can I get the result as below using any function of PostgreSQL?</p>
  
  <pre><code>invoiceid | Service Tax | ABC Tax
  ----------+-------------+--------
        119 |       28.69 |  25.78
  </code></pre>