Re: Unique index

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Unique index
Дата
Msg-id CAKFQuwYj8gq1Gu+b-vrLZrPk7Fd8YwMHP781Lechx0gTs5vZhA@mail.gmail.com
обсуждение исходный текст
Ответ на Unique index  (Rajesh Kumar <rajeshkumar.dba09@gmail.com>)
Список pgsql-admin
On Wednesday, September 20, 2023, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
Why unique index is used over unique constraints?

It’s rare that you would.  Occasionally people want to enforce uniqueness over a subset of the table - like if you want to ensure a maximum of one active record (for a given id) at any given time but allow for multiple historical records (for the same id) on the same table.

David J. 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: Unique index
Следующее
От: Rajesh Kumar
Дата:
Сообщение: Pg_cron not working