title: Use of Postgres table inheritance
body: <p>Since Postgres also supports partitioned tables, what is the use of child table.</p>
  <p>Suppose there is a table of users which has a column <code>created_date</code>. We can store data in 2 ways:</p>
  <ol>
  <li>We create many child tables of this user table and distribute the data of users on the basis of <code>created_date</code> (say, one table for every date, like <code>user_jan01_21</code>).</li>
  <li>We can create a partitioned table with the partitioning key <code>created_date</code></li>
  </ol>
  <p>Then what is the difference between these solution?
  Basically, I want to know what problem table inheritance can solve that partitioning cannot.</p>
  <p>Another doubt I have: if I follow solution 1, and I query the user table without the <code>ONLY</code> keyword, will it scan all the child tables?</p>
  <p>For example:</p>
  <pre><code>SELECT * FROM WHERE where created_date = current_date - 10;
  </code></pre>