[GENERAL] How to create unique index on multiple columns where the combination doesn't matter?
В списке pgsql-general по дате отправления:
| От | Glen Huang |
|---|---|
| Тема | [GENERAL] How to create unique index on multiple columns where the combination doesn't matter? |
| Дата | |
| Msg-id | 27CF1813-7E38-4928-8566-A24E7D45BAF2@gmail.com обсуждение исходный текст |
| Ответы |
Re: [GENERAL] How to create unique index on multiple columns wherethe combination doesn't matter?
Re: [GENERAL] How to create unique index on multiple columns wherethe combination doesn't matter? Re: [GENERAL] How to create unique index on multiple columns wherethe combination doesn't matter? |
| Список | pgsql-general |
Hello, If I have a table like CREATE TABLE relationship ( obj1 INTEGER NOT NULL REFERENCES object, obj2 INTEGER NOT NULL REFERENCES object, obj3 INTEGER NOT NULL REFERENCES object, ... ) And I want to constrain that if 1,2,3 is already in the table, rows like 1,3,2 or 2,1,3 shouldn't be allowed. Is there a general solution to this problem? Sorry if the question is too basic, but I couldn't find the answer in the doc, at least not in the chapter on unique index.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера