Re: Does PostgreSQL ever create indexes on its own?
| От | Alvaro Herrera |
|---|---|
| Тема | Re: Does PostgreSQL ever create indexes on its own? |
| Дата | |
| Msg-id | 20151112223414.GT614468@alvherre.pgsql обсуждение исходный текст |
| Ответ на | Re: Does PostgreSQL ever create indexes on its own? (Thomas Kellerer <spam_eater@gmx.net>) |
| Список | pgsql-general |
Thomas Kellerer wrote: > Doiron, Daniel schrieb am 12.11.2015 um 23:21: > >I’m troubleshooting a schema and found this: > > > >Indexes: > > "pk_patient_diagnoses" PRIMARY KEY, btree (id) > The only index that Postgres "automatically" creates is the unique index supporting a primary key or a unique constraint. > > But apart from that, Postgres never creates indexes on its own. > > So from the list above, only pk_patient_diagnose has (most probably) been created automatically. Everything else was createdmanually. As I recall, the naming convention is to append "_pkey", not to prepend "pk_", so not even that one. (Of course, you can tell it what name to use when creating the constraint, which is what was done here.) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-general по дате отправления: