| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера