Re: Modeling Friendship Relationships

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Modeling Friendship Relationships
Date: 2014-11-12 01:37:36
Message-ID: 5462B9E0.9040703@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Benjamin Scherrey 2014-11-12 12:02:16 Using bdr replication with SERIAL pseudo-type.
Previous Message David G Johnston 2014-11-12 01:32:13 Re: Modeling Friendship Relationships