title: Postgres: Merge records with same ID
body: <p>I have a below PG table, say:</p>
  <pre><code>id  | type
  ----+------
  001 | A
  001 | B
  002 | C
  002 | B
  </code></pre>
  <p>And I want to convert it into the table below:</p>
  <pre><code>id  | type
  ----+------
  001 | A, B
  002 | C, B
  </code></pre>
  <p>How can I do that? If there are possible duplicates to this question please link it as I was not able to frame the subject correctly.</p>