Search Postgresql Archives

Re: Does PostgreSQL ever create indexes on its own?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 created manually.

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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux