maria-developers team mailing list archive
Mailing list archive
Re: Partial indexes?
Yes, that's another good example of 11.3 where you caneither use a pg partial index, or a pg/mysql unique nullable column with active=true or null.
Thanks, James Briggs.
Cassandra/MySQL DBA. Available in San Jose area or remote.
From: Jared Beck <jared@xxxxxxxxxxxxx>
To: Sergei Golubchik <serg@xxxxxxxxxxx>
Sent: Wednesday, December 27, 2017 4:52 PM
Subject: Re: [Maria-developers] Partial indexes?
On Wed, Dec 27, 2017 at 3:30 PM, Sergei Golubchik <serg@xxxxxxxxxxx> wrote:
>> Any plans to implement partial indexes?
> No such plans at the moment.
> What do you you need them for?
I have used unique partial indexes to enforce business rules like
"Active users must have a unique phone number, but there may be any
number of inactive users with the same phone number"
create unique index ix_active_phones
on users (phone)
where active = true
Jared Beck • (607) 216-5373 • jared@xxxxxxxxxxxxx
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-developers
More help : https://help.launchpad.net/ListHelp