From: | "Mario Alberto Soto Cordones" <mario_soto(at)compuall(dot)cl> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | PROBLEM WITH FOREIGN KEY |
Date: | 2003-03-18 16:32:54 |
Message-ID: | 2132.192.168.1.100.1048005174.squirrel@www.compuall.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
hi.
i have a big problem...
i have created a 2 table cumacar and cumaasi,
the structure is
CUMACAR
cuidcar char(2)
cucodcar numeric(2)
cudescar varchar(35)
cuempcar numeric(2)
primary key (cucodcar, cuempcar)
CUMAASI
cucodasi numeric 3
cudesasi varchar 60
cucarasi numeric 2
cuempasi numeric 2
primary key (cucarasi, cucodasi, cuempasi)
i try create a foreing key and say:
Error - /var/www/html/phpPgAdmin/sql.php -- Line: 112
PostgreSQL ha dicho: ERROR: cumaasi_fk_cumacar referential integrity
violation - key referenced from cumaasi not found in cumacar
Your query:
ALTER TABLE cumaasi
ADD CONSTRAINT cumaasi_fk_cumacar
FOREIGN KEY(cucarasi, cuempasi)
REFERENCES
cumacar (cucodcar, cuempcar)
PLEASE HELP ME
sorry for my englis... i live in chile...
thank you
From | Date | Subject | |
---|---|---|---|
Next Message | Donald Fraser | 2003-03-18 16:50:35 | Re: PROBLEM WITH FOREIGN KEY |
Previous Message | Dave | 2003-03-18 14:50:18 | Sudden stop of postmaster - Looking for help |