Re: Error Message: ERROR: UNIQUE constraint matching given keys for referenced table 'item' not found - Mailing list pgadmin-support

From Dave Page
Subject Re: Error Message: ERROR: UNIQUE constraint matching given keys for referenced table 'item' not found
Date
Msg-id 50033.80.177.99.193.1062704432.squirrel@ssl.vale-housing.co.uk
Whole thread Raw
In response to Error Message: ERROR: UNIQUE constraint matching given keys for referenced table "item" not found  ("Robert T. Meneses" <rtmeneses@7-eleven.com.ph>)
List 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




pgadmin-support by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Re: Error Message: ERROR: UNIQUE constraint matching given keys for referenced table "item" not found
Next
From: Felipe Carreño
Date:
Subject: Error Message: ERROR: formato de entrada de float8 incorrecto '1062432759,21429'