Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd028338

Browse files
committed
doc: Document more that relations share a namespace
This was already documented in the CREATE INDEX reference, but not inthe introductory "Data Definition" chapter. Also, document that theindex that implements a constraint has the same name as theconstraint.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
1 parent21d9c3e commitd028338

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎doc/src/sgml/ddl.sgml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3003,7 +3003,11 @@ SELECT * FROM information WHERE group_id = 2 FOR UPDATE;
30033003
<para>
30043004
A database contains one or more named <firstterm>schemas</firstterm>, which
30053005
in turn contain tables. Schemas also contain other kinds of named
3006-
objects, including data types, functions, and operators. The same
3006+
objects, including data types, functions, and operators. Within one
3007+
schema, two objects of the same type cannot have the same name.
3008+
Furthermore, tables, sequences, indexes, views, materialized views, and
3009+
foreign tables share the same namespace, so that, for example, an index and
3010+
a table must have different names if they are in the same schema. The same
30073011
object name can be used in different schemas without conflict; for
30083012
example, both <literal>schema1</literal> and <literal>myschema</literal> can
30093013
contain tables named <literal>mytable</literal>. Unlike databases,

‎doc/src/sgml/ref/create_table.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
10271027
Adding a unique constraint will automatically create a unique B-tree
10281028
index on the column or group of columns used in the constraint. But if
10291029
the constraint includes a <literal>WITHOUT OVERLAPS</literal> clause, it
1030-
will use a GiST index.
1030+
will use a GiST index. The created index has the same name as the unique
1031+
constraint.
10311032
</para>
10321033

10331034
<para>
@@ -1082,6 +1083,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
10821083
<literal>PRIMARY KEY</literal> constraint will automatically create a
10831084
unique B-tree index, or GiST if <literal>WITHOUT OVERLAPS</literal> was
10841085
specified, on the column or group of columns used in the constraint.
1086+
That index has the same name as the primary key constraint.
10851087
</para>
10861088

10871089
<para>
@@ -1118,8 +1120,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
11181120

11191121
<para>
11201122
Exclusion constraints are implemented using
1121-
an index, so each specified operator must be associated with an
1122-
appropriate operator class
1123+
an index that has the same name as the constraint, so each specified
1124+
operator must be associated with anappropriate operator class
11231125
(see <xref linkend="indexes-opclass"/>) for the index access
11241126
method <replaceable>index_method</replaceable>.
11251127
The operators are required to be commutative.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp