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

Re: Error Message: ERROR: UNIQUE constraint matching given keys for referenced table 'item' not found

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <rtmeneses(at)7-eleven(dot)com(dot)ph>
Cc: <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Error Message: ERROR: UNIQUE constraint matching given keys for referenced table 'item' not found
Date: 2003-09-04 19:40:32
Message-ID: 50033.80.177.99.193.1062704432.squirrel@ssl.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgadmin-support
It's rumoured that Robert T. Meneses once said:
> Im having trouble creating foreign key for this
> table (itemsupp) both have itemcode column but
> when I created this error occur telling UNIQUE
> contraint matching. What shall I do?

Hi,

It seems that PostgreSQL wants to have a Unique constraint  on the
referenced columns. Can you try something like
ALTER TABLE ref_table ADD CONSTRAINT ref_key UNIQUE (ref_col1, ref_col2);

to add a unique contsraint?

Regards, Dave



In response to

pgadmin-support by date

Next:From: frank_lupoDate: 2003-09-05 06:40:24
Subject: Re: Error Message: ERROR: formato de entrada de
Previous:From: Hiroshi SaitoDate: 2003-09-04 18:32:01
Subject: Re: Error Message: ERROR: UNIQUE constraint matching given keys for referenced table "item" not found

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