title: No unique constraint matching given keys for referenced table
body: <p>I have a <code>date_dimension</code> table definition:  </p>
  
  <pre><code>CREATE TABLE date_dimension
  (
    id integer primary key,
    date text,
    year double precision,
    year_for_week double precision,
    quarter double precision
  );
  </code></pre>
  
  <p>I am trying to create a <code>fact</code> table that fails </p>
  
  <pre><code>create table fact ( 
    id serial primary key,
    contract integer,
    component integer,
    evaluation_date integer,
    effective_date integer,
    foreign key (evaluation_date, effective_date) references date_dimension(id, id)
  );
  </code></pre>
  
  <p>The error is :  </p>
  
  <pre><code>ERROR:  there is no unique constraint matching given keys for referenced 
  table "date_dimension"
  
  SQL state: 42830 
  </code></pre>
  
  <p>I am not sure how to fix this.</p>