Re: odd error...

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: odd error...
Дата
Msg-id m3u1c2jvti.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на odd error...  ("alex b." <mailinglists1@gmx.de>)
Список pgsql-general
"alex b." <mailinglists1@gmx.de> writes:

> > Column "mp3checksum" of table "tcontent" needs a UNIQUE
> > constraint--does it have one?
>
> no it doesn't - because it is possible that the same exact file might
> be existent on multiple CDs...
> and therefore "mp3checksum" cannot have a UNIQUE constraint.
> am I right?

Then "mp3checksum" can't be a foreign key--a foreign key must be
unique in its own table.  If "tcontent" has a primary key, use that as
the foreign key in in the other table; if it doesn't, you might want
to create a SERIAL column to serve as the primary key.

-Doug

В списке pgsql-general по дате отправления:

Предыдущее
От: "alex b."
Дата:
Сообщение: Re: odd error...
Следующее
От: Andy Lewis
Дата:
Сообщение: Type Error