Re: Constraints for grouping - Mailing list pgsql-sql

From PostgreSQL Admin
Subject Re: Constraints for grouping
Date
Msg-id 46DCA4F9.4030805@productivitymedia.com
Whole thread Raw
In response to Re: Constraints for grouping  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-sql
> --- 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


pgsql-sql by date:

Previous
From: chester c young
Date:
Subject: Re: Execute SQL statements with 'context'/predefined variables
Next
From: "Luiz K. Matsumura"
Date:
Subject: Cast on character columns in views