Skip to content

Commit 4bd5380

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 b9d9467 commit 4bd5380

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

doc/src/sgml/ddl.sgml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,19 +2042,18 @@ SELECT * FROM information WHERE group_id = 2 FOR UPDATE;
20422042
</indexterm>
20432043

20442044
<para>
2045-
A <productname>PostgreSQL</productname> database cluster
2046-
contains one or more named databases. Users and groups of users are
2047-
shared across the entire cluster, but no other data is shared across
2048-
databases. Any given client connection to the server can access
2049-
only the data in a single database, the one specified in the connection
2050-
request.
2045+
A <productname>PostgreSQL</productname> database cluster contains
2046+
one or more named databases. Roles and a few other object types are
2047+
shared across the entire cluster. A client connection to the server
2048+
can only access data in a single database, the one specified in the
2049+
connection request.
20512050
</para>
20522051

20532052
<note>
20542053
<para>
20552054
Users of a cluster do not necessarily have the privilege to access every
2056-
database in the cluster. Sharing of user names means that there
2057-
cannot be different users named, say, <literal>joe</> in two databases
2055+
database in the cluster. Sharing of role names means that there
2056+
cannot be different roles named, say, <literal>joe</literal> in two databases
20582057
in the same cluster; but the system can be configured to allow
20592058
<literal>joe</> access to only some of the databases.
20602059
</para>

doc/src/sgml/manage-ag.sgml

Lines changed: 7 additions & 9 deletions
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</>, 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)