Split column and values into multiple rows in Postgres
<p>Suppose I have a table like this:</p>

<pre><code>        subject     | flag | first_date | last_date
    ----------------+----------------------------------
     this is a test |  2   |  1/1/2016  | 1/4/2016
</code></pre>

<p>into something like this:</p>

<pre><code>       subject      | flag   |   date
    ----------------+------------------
     this is a test |    .5  |  1/1/2016
     this is a test |    .5  |  1/2/2016
     this is a test |    .5  |  1/3/2016
     this is a test |    .5  |  1/4/2016
</code></pre>

<p>Is there an easy way to do this?</p>