Skip to content

Commit 009e422

Browse files
committed
doc: clarify hierarchy of objects: global, db, schema, etc.
The previous wording was confusing because it wasn't in decreasing order and had to backtrack. Also clarify role/user wording. Reported-by: jbird@nuna.com Discussion: https://postgr.es/m/158057750885.1123.2806779262588618988@wrigleys.postgresql.org Backpatch-through: 9.5
1 parent 046fd4f commit 009e422

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

doc/src/sgml/ddl.sgml

+7-8
Original file line numberDiff line numberDiff line change
@@ -2625,19 +2625,18 @@ SELECT * FROM information WHERE group_id = 2 FOR UPDATE;
26252625
</indexterm>
26262626

26272627
<para>
2628-
A <productname>PostgreSQL</productname> database cluster
2629-
contains one or more named databases. Users and groups of users are
2630-
shared across the entire cluster, but no other data is shared across
2631-
databases. Any given client connection to the server can access
2632-
only the data in a single database, the one specified in the connection
2633-
request.
2628+
A <productname>PostgreSQL</productname> database cluster contains
2629+
one or more named databases. Roles and a few other object types are
2630+
shared across the entire cluster. A client connection to the server
2631+
can only access data in a single database, the one specified in the
2632+
connection request.
26342633
</para>
26352634

26362635
<note>
26372636
<para>
26382637
Users of a cluster do not necessarily have the privilege to access every
2639-
database in the cluster. Sharing of user names means that there
2640-
cannot be different users named, say, <literal>joe</literal> in two databases
2638+
database in the cluster. Sharing of role names means that there
2639+
cannot be different roles named, say, <literal>joe</literal> in two databases
26412640
in the same cluster; but the system can be configured to allow
26422641
<literal>joe</literal> access to only some of the databases.
26432642
</para>

doc/src/sgml/manage-ag.sgml

+7-9
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
</indexterm>
2323

2424
<para>
25-
A database is a named collection of <acronym>SQL</acronym> objects
26-
(<quote>database objects</quote>). Generally, every database
27-
object (tables, functions, etc.) belongs to one and only one
28-
database. (However there are a few system catalogs, for example
29-
<literal>pg_database</literal>, that belong to a whole cluster and
30-
are accessible from each database within the cluster.) More
31-
accurately, a database is a collection of schemas and the schemas
32-
contain the tables, functions, etc. So the full hierarchy is:
33-
server, database, schema, table (or some other kind of object,
25+
A small number of objects, like role, database, and tablespace
26+
names, are defined at the cluster level and stored in the
27+
<literal>pg_global</literal> tablespace. Inside the cluster are
28+
multiple databases, which are isolated from each other but can access
29+
cluster-level objects. Inside each database are multiple schemas,
30+
which contain objects like tables and functions. So the full hierarchy
31+
is: cluster, database, schema, table (or some other kind of object,
3432
such as a function).
3533
</para>
3634

0 commit comments

Comments
 (0)