Re: ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Dado Feigenblatt" <dado(at)wildbrain(dot)com>, "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found
Date: 2001-07-17 08:37:07
Message-ID: 005901c10e9b$ab5cf400$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From: "Dado Feigenblatt" <dado(at)wildbrain(dot)com>

> I'm trying to create some tables with foreign keys.
> When I try to create a foreign key ...
>
> foreign key(seq_code) references sequences(seq_code) on update
> CASCADE on delete CASCADE,
>
> I get this message:
>
> ERROR: UNIQUE constraint matching given keys for referenced table
> "sequences" not found
>
> The problem is that the referenced field and table exist.
> Any hint?

Do you have a unique index on sequences.seq_code?

- Richard Huxton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Maxim Maletsky 2001-07-17 10:16:11 RE: Re: drop table if exists
Previous Message Dado Feigenblatt 2001-07-17 02:46:29 ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found