pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found
2+ messages / 2 participants
[nested] [flat]

* ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found
@ 2001-07-17 02:46  Dado Feigenblatt <dado@wildbrain.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Dado Feigenblatt @ 2001-07-17 02:46 UTC (permalink / raw)
  To: pgsql-sql

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?

Using psql and PostgreSQL 7.1.1 on RedHat 7.1
Thanks.

-- 
Dado Feigenblatt                                 Wild Brain, Inc.   
Technical Director                               (415) 553-8000 x???
dado@wildbrain.com                               San Francisco, CA.






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found
@ 2001-07-17 08:37  Richard Huxton <dev@archonet.com>
  parent: Dado Feigenblatt <dado@wildbrain.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Huxton @ 2001-07-17 08:37 UTC (permalink / raw)
  To: Dado Feigenblatt <dado@wildbrain.com>; pgsql-sql

From: "Dado Feigenblatt" <dado@wildbrain.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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-07-17 08:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 02:46 ERROR: UNIQUE constraint matching given keys for referenced table "sequences" not found Dado Feigenblatt <dado@wildbrain.com>
2001-07-17 08:37 ` Richard Huxton <dev@archonet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox