title: PostgreSQL for each row from one table join all rows from another table
body: <p>In table <code>A</code> I have dates from <code>2014-01-01</code> to <code>2014-12-31</code></p>
  
  <pre><code> action_date
   2014-01-01
   2014-01-02
   2014-01-03
   ...
   2014-12-31
  </code></pre>
  
  <p>In table <code>B</code> I have some information like</p>
  
  <pre><code>id name action_date deletion_date
  1  nik  2013-01-01  2014-02-03
  2  tom  2014-06-02  2014-06-30
  3  lola 2013-12-30  2014-01-01
  </code></pre>
  
  <p>I want to join row from B table to each <code>A</code> table row if <code>activation_date&lt;=action_date&lt;=deletion_date</code></p>
  
  <p>e.g. </p>
  
  <pre><code> action_date id name action_date deletion_date
   2014-01-01  1  nik  2013-01-01  2014-02-03
   2014-01-01  3  lola 2013-12-30  2014-01-01
   2014-01-02  1  nik  2013-01-01  2014-02-03
   2014-01-03  1  nik  2013-01-01  2014-02-03
     [...]
   2014-02-03  1  nik  2013-01-01  2014-02-03
  
   2014-06-02  2  tom  2014-06-02  2014-06-30
   2014-06-03  2  tom  2014-06-02  2014-06-30
     [...]
   2014-06-03  2  tom  2014-06-02  2014-06-30
  </code></pre>
  
  <p>I tried to use left join without on statement, only with where condition. Unfortunately, it's not working.</p>