title: Split column into multiple rows in Postgres
body: <p>Suppose I have a table like this:</p>
  
  <pre><code>    subject     | flag
  ----------------+------
   this is a test |    2
  </code></pre>
  
  <p><code>subject</code> is of type <code>text</code>, and <code>flag</code> is of type <code>int</code>. I would like to transform this table to something like this in Postgres:</p>
  
  <pre><code>    token       | flag
  ----------------+------
   this           |    2
   is             |    2
   a              |    2
   test           |    2
  </code></pre>
  
  <p>Is there an easy way to do this?</p>