title: PostgreSQL convert columns to rows? Transpose?
body: <p>I have a PostgreSQL function (or table) which gives me the following output:</p>
  
  <pre><code>Sl.no    username    Designation    salary   etc..
   1        A           XYZ            10000    ...
   2        B           RTS            50000    ...
   3        C           QWE            20000    ...
   4        D           HGD            34343    ...
  </code></pre>
  
  <p>Now I want the Output as below:</p>
  
  <pre><code>Sl.no            1       2        3       4       ...
   Username        A       B        C       D       ...
   Designation     XYZ     RTS      QWE     HGD     ...
   Salary          10000   50000    20000   34343   ...
  </code></pre>
  
  <p>How to do this?</p>