Skip site navigation (1) Skip section navigation (2)

foreign key violation error with partitioned table

From: "gunce orman" <gunceorman(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: foreign key violation error with partitioned table
Date: 2007-09-06 08:49:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

i have a partitioned table t_kayit with  6 partitions and kayit_id is
primary key on this table. My other t_vto_sonuclari table use that kayit_id
as foreign key. I'm trying to insert  values which contains kayit_id to
t_vto_sonuclari and i'm sure those  kayit_ids are   in t_kayit table but
when i'm inserting , i had  error.

ERROR:  insert or update on table "t_vto_sonuclari" violates foreign key
constraint "fk_t_kayit_kayit_id"
DETAIL:  Key(kayit_id)=(54168) is not present in table t_kayit

I created a new test table which is as same  as t_kayit but non partitioned
. I create new foreign key on that t_vto_sonuclari which refers to the new
test table.  In that case i didn't had that error.I could insert. what am i
supposed to do for partitioned table?


pgsql-admin by date

Next:From: Jayaram BhatDate: 2007-09-06 13:15:29
Subject: ADO -PostgreSQL OLE DB Provider
Previous:From: Daniel RubioDate: 2007-09-06 07:32:16
Subject: Re: Can't login to 8.2.4 if not superuser...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group