Example for Unique Partial Indexes

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема Example for Unique Partial Indexes
Дата
Msg-id 169936161918.1769272.9365256195677055160@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: Example for Unique Partial Indexes  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/indexes-unique.html
Description:

I would like to request an improvement to the PostgreSQL documentation,
specifically in the sections "11.6. Unique Indexes" and "11.8. Partial
Indexes."

Currently, the documentation does not provide information on how to create
unique partial indexes. Unique partial indexes are valuable for enforcing
uniqueness of a column's value over a subset of a table.

To enhance the documentation's completeness and to provide a clear example
for users, I propose adding an entry in one of these sections with an
example as follows:

```sql
Copy code
-- Example of Creating a Unique Partial Index
-- This index enforces uniqueness of the 'column' over a subset of the
table
CREATE UNIQUE INDEX name ON table (column [, ...]) WHERE (condition);
This addition will assist users in understanding how to create unique
partial indexes and help them enforce uniqueness over specific subsets of
their tables. Please consider incorporating this addition into the
documentation.
```

Thank you for your attention to this request, and I believe it will
contribute to the clarity and comprehensiveness of the PostgreSQL
documentation.

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

Предыдущее
От: Erki Eessaar
Дата:
Сообщение: An inconsistency in the documentation about full text search
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Example for Unique Partial Indexes