create table pacientes (cedula_p integer primary key,
nombre_p varchar(100),
edad_p integer,
sexo_p varchar(10),
fecha_cita_p varchar(15));
create table historias (id_historia_h integer primary key,
nombre_h varchar(100) REFERENCES pacientes(nombre_p)on delete cascade on update cascade,
cedula_h integer REFERENCES pacientes(cedula_p)on delete cascade on update cascade,
edad_h integer REFERENCES pacientes(edad_p)on delete cascade on update cascade,
motivo_consulta varchar(5000),
enfermedad_actual varchar(5000),
antecedentes_familiares varchar(5000),
antedecentes_personales varchar(5000),
habitos_psicobiologicos varchar(5000),
oido varchar(5000),
nariz_senos_paranasales varchar(5000),
boca_faringe varchar(5000),
laringe varchar(5000),
cuello varchar(5000),
diagnostico varchar(5000),
indicaiones_h varchar(5000));
me da este error --->
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pacientes_pkey" for table "pacientes"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "historias_pkey" for table "historias"
ERROR: there is no unique constraint matching given keys for referenced table "pacientes"
SQL state: 42830 me pueden explicar please??