From: dev@archonet.com
To: mallah@trade-india.com
Cc: pgsql-sql@postgresql.org
Subject: Re: enforcing with unique indexes..
Date: Sat, 5 Oct 2002 15:13:12 +0100 (BST)
Message-ID: <49201.192.168.1.32.1033827192.squirrel@mainbox.archonet.com> (raw)
In-Reply-To: <200210051219.07553.mallah@trade-india.com>
References: <200210051219.07553.mallah@trade-india.com>
>
> ie i want 1 to 1 mapping between group_id and userid so that , there
> shud not be a single group_id having more that one kind of userid.
>
> can it be done with some sort of UNIQUE INDEX?
If you want multiple groups but the user should always be the same
1 1 ok
1 1 ok
2 1 ok
3 2 ok
3 3 bad
Perhaps you should normalise a bit further with a separate group_user
table - you could restrict that to being unique on group then.
- Richard Huxton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, mallah@trade-india.com
Subject: Re: enforcing with unique indexes..
In-Reply-To: <49201.192.168.1.32.1033827192.squirrel@mainbox.archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox