Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pleshevskiy/02d053c9286df96450b5b6f54298f0d3 to your computer and use it in GitHub Desktop.
Save pleshevskiy/02d053c9286df96450b5b6f54298f0d3 to your computer and use it in GitHub Desktop.

Revisions

  1. @popravich popravich revised this gist Oct 15, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion PostgreSQL_index_naming.rst
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,6 @@ Standard suffix for sequences is

    ``seq`` for all sequences

    Found `here<http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266>`_
    Found `here`_

    .. _here: http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266
  2. @popravich popravich revised this gist Oct 15, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion PostgreSQL_index_naming.rst
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@ Standard suffix for sequences is

    ``seq`` for all sequences

    Found here -- http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266
    Found `here<http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266>`_
  3. @popravich popravich revised this gist Oct 15, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions PostgreSQL_index_naming.rst
    Original file line number Diff line number Diff line change
    @@ -15,5 +15,4 @@ Standard suffix for sequences is

    ``seq`` for all sequences

    See http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266
    for naming convention.
    Found here -- http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266
  4. @popravich popravich created this gist Oct 15, 2015.
    19 changes: 19 additions & 0 deletions PostgreSQL_index_naming.rst
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    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;
    * ``key`` for a Unique constraint;
    * ``excl`` for an Exclusion constraint;
    * ``idx`` for any other kind of index;
    * ``fkey`` for a Foreign key;
    * ``check`` for a Check constraint;

    Standard suffix for sequences is

    ``seq`` for all sequences

    See http://stackoverflow.com/questions/4107915/postgresql-default-constraint-names/4108266#4108266
    for naming convention.