Constraint for two fields unique any order

Поиск
Список
Период
Сортировка
От MargaretGillon@chromalloy.com
Тема Constraint for two fields unique any order
Дата
Msg-id OF69153234.44961C4B-ON882571B0.0056FC62-882571B0.0058013D@CHROMALLOY.COM
обсуждение исходный текст
Ответы Re: Constraint for two fields unique any order  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: Constraint for two fields unique any order  (Bob Dowling <rjd4@cam.ac.uk>)
Re: Constraint for two fields unique any order  (Reece Hart <reece@harts.net>)
Список pgsql-general

I have a junction table that is recording relationships between two records in another table. Is there a way that I can create a constraint so that the values are not repeated in any order? I want to make sure that rows such as 2 and 4 in the example below cannot happen. This is a very small table that is meta data for an application. It is only 41 rows now and probably won't grow beyond 200 rows. I am on Postgresql ver 7.3.4 .

id   fkey1   fkey2
1      3           4        
2    10         4
3      2           7        
4     4          10        
5   15          8

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297

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

Предыдущее
От: Anastasios Hatzis
Дата:
Сообщение: Difference between function and procedure?
Следующее
От: Richard Broersma Jr
Дата:
Сообщение: Re: Constraint for two fields unique any order