| From: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
|---|---|
| To: | MargaretGillon(at)chromalloy(dot)com, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Constraint for two fields unique any order |
| Date: | 2006-07-19 16:25:50 |
| Message-ID: | 20060719162550.25622.qmail@web31808.mail.mud.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
CREATE TABLE junction
(
);
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roman Neuhauser | 2006-07-19 16:27:06 | Re: Messages to pgsql-general list not being posted |
| Previous Message | MargaretGillon | 2006-07-19 16:01:23 | Constraint for two fields unique any order |