Re: Modeling Friendship Relationships

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Modeling Friendship Relationships
Дата
Msg-id 5462B9E0.9040703@hogranch.com
обсуждение исходный текст
Ответ на Re: Modeling Friendship Relationships  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-general
On 11/11/2014 5:32 PM, David G Johnston wrote:
> Bill's solution:
>
>   PRIMARY KEY (person1, person2),
>   CHECK (person1 < person2)
>
> seems to make this constraint fairly simple...am I missing something?

oh, I guess I missed that part.   of course, you'll have to make sure
you swap any relation into lesser,greater before inserting into this
table, but such is life.    I suppose a insert trigger could force this.




--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: Modeling Friendship Relationships
Следующее
От: Benjamin Scherrey
Дата:
Сообщение: Using bdr replication with SERIAL pseudo-type.