From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | pgsql-docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Outdated note about unique indexes |
Date: | 2015-07-08 21:56:09 |
Message-ID: | CAK3UJRE4wGWMjGOfUZcTAOn_k43ETi-jh6FsLF7XX3=Qmkdt3A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Hi,
I noticed that the note on a page about unique indexes
http://www.postgresql.org/docs/current/static/indexes-unique.html
says "The preferred way to add a unique constraint to a table is ALTER
TABLE ... ADD CONSTRAINT. The use of indexes to enforce unique constraints
could be considered an implementation detail that should not be accessed
directly... ".
That note has been there forever, in particular since before we supported
CONCURRENTLY, which is pretty darn important in many uses nowadays. Since
it seems like some users have taken this suggestion seriously, e.g. on
stackoverflow[1], how about we remove this outdated suggestion? There is
already a previous mention a few sections earlier[2] suggesting the use of
CONCURRENTLY, so I don't think we really need to reiterate that suggestion
here.
Josh
[1]
http://stackoverflow.com/questions/23542794/postgres-unique-constraint-vs-index
[2] http://www.postgresql.org/docs/current/interactive/indexes-intro.html
Attachment | Content-Type | Size |
---|---|---|
indices_constraint_suggestion.diff | text/plain | 769 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2015-07-08 22:10:46 | Re: Outdated note about unique indexes |
Previous Message | Monica Gamazo | 2015-06-30 00:11:26 | Re: Omission of "(or C)" in psql's "pset title" header |