title: PostgreSQL foreign key with inheritance
body: <p>I have a PostgreSQL database, 3 tables and my schema as follows.
  <a href="https://i.stack.imgur.com/2xhLL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2xhLL.png" alt="enter image description here"></a></p>
  
  <pre><code>CREATE TABLE table_a (
      id SERIAL PRIMARY KEY,
      name_a VARCHAR(255)
  );
  
  CREATE TABLE table_b (
      name_b VARCHAR(255) 
  ) INHERITS (table_a);
  
  CREATE TABLE table_c (
      name_c VARCHAR(255)
  ) INHERITS (table_a);
  
  insert into table_b (name_a, name_b) values('table A','table B1');
  insert into table_b (name_a, name_b) values('table A','table B2');
  insert into table_c (name_a, name_c) values('table A','table C1');
  insert into table_c (name_a, name_c) values('table A','table C2');
  
  select * from table_a;
  select * from table_b;
  select * from table_c;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hFn84.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hFn84.png" alt="enter image description here"></a></p>
  
  <p>Now i want to add an association between <code>Table B</code>and <code>Table C</code> like this:</p>
  
  <p><a href="https://i.stack.imgur.com/0FGiv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0FGiv.png" alt="enter image description here"></a></p>
  
  <p>I do not know if this is possible when we inherit the same table ?</p>
  
  <p>I do not see how I can create this association ?</p>