pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Alberto Soto Cordones <mario_soto@compuall.cl>
To: pgsql-admin@postgresql.org
Subject: PROBLEM WITH FOREIGN KEY
Date: Tue, 18 Mar 2003 12:32:54 -0400 (CLT)
Message-ID: <2132.192.168.1.100.1048005174.squirrel@www.compuall.cl> (raw)

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













view thread (7+ messages)  latest in thread

Message-ID: <2132.192.168.1.100.1048005174.squirrel@www.compuall.cl>
Permalink:  ../2132.192.168.1.100.1048005174.squirrel@www.compuall.cl/
Also on:    postgresql.org/message-id/2132.192.168.1.100.1048005174.squirrel@www.compuall.cl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mario_soto@compuall.cl
  Subject: Re: PROBLEM WITH FOREIGN KEY
  In-Reply-To: <2132.192.168.1.100.1048005174.squirrel@www.compuall.cl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox