1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

doc: Document more that relations share a namespace

This was already documented in the CREATE INDEX reference, but not in
the introductory "Data Definition" chapter.  Also, document that the
index that implements a constraint has the same name as the
constraint.

Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: jian he <jian.universality@gmail.com>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxFG682tYcP9aH_F-jrqq5End8MHZR77zcp1%3DDUrEsSu1Q%40mail.gmail.com
This commit is contained in:
Peter Eisentraut
2024-01-31 11:53:56 +01:00
parent 21d9c3ee4e
commit d0283387d3
2 changed files with 10 additions and 4 deletions

View File

@@ -1027,7 +1027,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
Adding a unique constraint will automatically create a unique B-tree
index on the column or group of columns used in the constraint. But if
the constraint includes a <literal>WITHOUT OVERLAPS</literal> clause, it
will use a GiST index.
will use a GiST index. The created index has the same name as the unique
constraint.
</para>
<para>
@@ -1082,6 +1083,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<literal>PRIMARY KEY</literal> constraint will automatically create a
unique B-tree index, or GiST if <literal>WITHOUT OVERLAPS</literal> was
specified, on the column or group of columns used in the constraint.
That index has the same name as the primary key constraint.
</para>
<para>
@@ -1118,8 +1120,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<para>
Exclusion constraints are implemented using
an index, so each specified operator must be associated with an
appropriate operator class
an index that has the same name as the constraint, so each specified
operator must be associated with an appropriate operator class
(see <xref linkend="indexes-opclass"/>) for the index access
method <replaceable>index_method</replaceable>.
The operators are required to be commutative.