Skip to content

Instantly share code, notes, and snippets.

View lopezator's full-sized avatar
🐐
you have goat to be kidding me

David Lobe lopezator

🐐
you have goat to be kidding me
View GitHub Profile
@lopezator
lopezator / PostgreSQL_index_naming.rst
Last active November 18, 2019 12:20 — forked from popravich/PostgreSQL_index_naming.rst
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • uq for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;