I have a date_dimension table definition:  
CREATE TABLE date_dimension
(
  id integer primary key,
  date text,
  year double precision,
  year_for_week double precision,
  quarter double precision
);
I am trying to create a fact table that fails 
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)
);
The error is :
ERROR:  there is no unique constraint matching given keys for referenced 
table "date_dimension"
SQL state: 42830 
I am not sure how to fix this.
 
     
     
     
    