title: Delete rows with foreign key in PostgreSQL
body: <p>I would like to delete rows which contain a foreign key, but when I try something like this:</p>
  
  <pre><code>DELETE FROM osoby WHERE id_osoby='1'
  </code></pre>
  
  <p>I get this statement:</p>
  
  <blockquote>
    <p>ERROR:  update or delete on table "osoby" violates foreign key constraint "kontakty_ibfk_1" on table "kontakty"
    DETAIL:  Key (id_osoby)=(1) is still referenced from table "kontakty".</p>
  </blockquote>
  
  <p>How can I delete these rows?</p>