| От | Peter Eisentraut |
|---|---|
| Тема | Re: no dup rows |
| Дата | |
| Msg-id | 200408022101.44412.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | no dup rows (Jodi Kanter <jkanter@virginia.edu>) |
| Список | pgsql-admin |
Jodi Kanter wrote: > I have a linking table that has only two fields in it and both are > foreign keys to other tables. I'd like to ensure that there are never > any duplicate rows in this table. I was planning on creating a > multi-column unique index to satisfy this requirement. Is there a > more appropriate way to accomplish this or am I on the right track?> In "linking tables" you should usually make the entire set of columns the primary key. This would solve your problem. -- Peter Eisentraut http://developer.postgresql.org/~petere/
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера