From: PostgreSQL Admin <postgres@productivitymedia.com>
To: Richard Broersma Jr <rabroersma@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Constraints for grouping
Date: Mon, 03 Sep 2007 20:21:13 -0400
Message-ID: <46DCA4F9.4030805@productivitymedia.com> (raw)
In-Reply-To: <917951.78388.qm@web31814.mail.mud.yahoo.com>
References: <917951.78388.qm@web31814.mail.mud.yahoo.com>
> --- Richard Broersma Jr <rabroersma@yahoo.com> wrote:
>
>> CREATE UNIQUE INDEX Only_one_row_true
>> ON Your_table ( featured )
>> WHERE featured = true;
>>
>> Or if you want to only allow 1 featured article per catagory then:
>>
>> CREATE UNIQUE INDEX Only_one_row_true_per_catagory
>> ON Your_table ( catigories, featured )
>> WHERE featured = true;
>>
>
> I forgot the unique part of the DDL.
>
> Regards,
> Richard Broersma Jr.
>
>
Thanks for the information. I will check it out and get back to you.
Thanks again,
J
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: postgres@productivitymedia.com, rabroersma@yahoo.com
Subject: Re: Constraints for grouping
In-Reply-To: <46DCA4F9.4030805@productivitymedia.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