From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | "Shaun W(dot) Kruger" <shaun(at)linuxhost(dot)cc> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: referential integrity violations |
Date: | 2003-06-10 23:00:25 |
Message-ID: | 20030610155633.X68889-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 10 Jun 2003, Shaun W. Kruger wrote:
> I'm getting some pretty strange results when doing a mass
> create of my database structure. I get the following when
> it goes to create the foreign keys. I just can't figure out
> why it is that half of them complain and the other half don't.
>
> NOTICE: ALTER TABLE will create implicit trigger(s) for
> FOREIGN KEY check(s)
> ALTER TABLE
> NOTICE: ALTER TABLE will create implicit trigger(s) for
> FOREIGN KEY check(s)
> ERROR: groupidfk referential integrity violation - key
> referenced from users not found in groups
> NOTICE: ALTER TABLE will create implicit trigger(s) for
> FOREIGN KEY check(s)
> ALTER TABLE
> NOTICE: ALTER TABLE will create implicit trigger(s) for
> FOREIGN KEY check(s)
> ERROR: justispidfk referential integrity violation - key
> referenced from userinfo not found in ispusers
> NOTICE: ALTER TABLE will create implicit trigger(s) for
> FOREIGN KEY check(s)
> ALTER TABLE
> NOTICE: ALTER TABLE will create implicit trigger(s) for
> FOREIGN KEY check(s)
> ERROR: uinfoidfk referential integrity violation - key
> referenced from payments not found in userinfo
The problem appears to be that you have invalid data in the tables and so
the constraints start off invalidated.
>From 7.4:
NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ERROR: groupidfk referential integrity violation - key (groupid)=(0)
referenced from users not found in groups
NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ALTER TABLE
NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ERROR: justispidfk referential integrity violation - key (justispid)=(0)
referenced from userinfo not found in ispusers
NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ALTER TABLE
NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ERROR: uinfoidfk referential integrity violation - key (uinfoid)=(0)
referenced from payments not found in userinfo
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Tkach | 2003-06-10 23:01:41 | Re: referential integrity violations |
Previous Message | Shaun W. Kruger | 2003-06-10 22:56:58 | referential integrity violations |