Re: odd error... - Mailing list pgsql-general

From Doug McNaught
Subject Re: odd error...
Date
Msg-id m31xz6lb5d.fsf@varsoon.wireboard.com
Whole thread Raw
In response to odd error...  ("alex b." <mailinglists1@gmx.de>)
Responses Re: odd error...  ("alex b." <mailinglists1@gmx.de>)
List pgsql-general
"alex b." <mailinglists1@gmx.de> writes:

> CREATE TABLE tmp3 (
>
> datname VARCHAR(255),
> title VARCHAR(100),
> artist VARCHAR(100),
> album VARCHAR(100),
> mp3checksum CHAR(32),
> CONSTRAINT md5
>     FOREIGN KEY (mp3checksum)
>     REFERENCES tcontent (mp3checksum)
>     ON DELETE CASCADE
> );
>
> NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s)
> ERROR:  UNIQUE constraint matching given keys for referenced table
> "tcontent" not found
>
> what am I doing wrong here?

Column "mp3checksum" of table "tcontent" needs a UNIQUE
constraint--does it have one?

-Doug

pgsql-general by date:

Previous
From: "alex b."
Date:
Subject: odd error...
Next
From: "alex b."
Date:
Subject: Re: odd error...