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

Commit9b03776

Browse files
committed
A bunch of small doco updates motivated by scanning the comments on
the interactive docs.
1 parent9f07cb7 commit9b03776

22 files changed

+257
-155
lines changed

‎doc/src/sgml/arch-pg.sgml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Title><ProductName>Postgres</ProductName> Architectural Concepts</Title>
66

77
<Para>
8-
Before wecontinue, you should understand the basic
8+
Before webegin, you should understand the basic
99
<ProductName>Postgres</ProductName> system architecture. Understanding how the
1010
parts of <ProductName>Postgres</ProductName> interact will make the next chapter
1111
somewhat clearer.
@@ -16,7 +16,7 @@
1616
<ItemizedList>
1717
<ListItem>
1818
<Para>
19-
A supervisory daemon process (<Application>postmaster</Application>),
19+
A supervisory daemon process (the<Application>postmaster</Application>),
2020
</Para>
2121
</ListItem>
2222
<ListItem>
@@ -26,17 +26,18 @@
2626
</ListItem>
2727
<ListItem>
2828
<Para>
29-
theone or more backend database servers (the <Application>postgres</Application> process itself).
29+
one or more backend database servers (the <Application>postgres</Application> process itself).
3030
</Para>
3131
</ListItem>
3232
</ItemizedList>
3333
</para>
3434
<Para>
3535
A single <Application>postmaster</Application> manages a given collection of
3636
databases on a single host. Such a collection of
37-
databases is called a cluster (of databases). Frontend
38-
applications that wish to access a given database
39-
within a cluster make calls to the library.
37+
databases is called a cluster (of databases). A frontend
38+
application that wishes to access a given database
39+
within a cluster makes calls to an interface library (eg, libpq)
40+
that is linked into the application.
4041
The library sends user requests over the network to the
4142
<Application>postmaster</Application>
4243
(<XRef LinkEnd="PGARCH-CONNECTIONS">(a)),
@@ -58,30 +59,39 @@ which in turn starts a new backend server process
5859
From that point on, the frontend process and the backend
5960
server communicate without intervention by the
6061
<Application>postmaster</Application>. Hence, the <Application>postmaster</Application> is always running, waiting
61-
for requests, whereas frontend and backend processes
62+
forconnectionrequests, whereas frontend and backend processes
6263
come and go. The <FileName>libpq</FileName> library allows a single
6364
frontend to make multiple connections to backend processes.
64-
However, the frontend application is still a
65-
single-threaded process. Multithreaded frontend/backend
66-
connections are not currently supported in <FileName>libpq</FileName>.
65+
However, each backend process is a single-threaded process that can
66+
only execute one query at a time; so the communication over any one
67+
frontend-to-backend connection is single-threaded.
68+
</Para>
69+
70+
<Para>
6771
One implication of this architecture is that the
68-
<Application>postmaster</Application> and the backend always run on the same
69-
machine (the database server), while the frontend
72+
<Application>postmaster</Application> and the backend always run on the
73+
samemachine (the database server), while the frontend
7074
application may run anywhere. You should keep this
7175
in mind,
7276
because the files that can be accessed on a client
7377
machine may not be accessible (or may only be accessed
74-
using a differentfile name) on the database server
78+
using a differentpath name) on the database server
7579
machine.
80+
</Para>
81+
82+
<Para>
7683
You should also be aware that the <Application>postmaster</Application> and
7784
postgres servers run with the user-id of the <ProductName>Postgres</ProductName>
78-
"superuser."
85+
<quote>superuser</>.
7986
Note that the <ProductName>Postgres</ProductName> superuser does not
80-
have to bea special user (e.g., a user named
87+
have to beany particular user (e.g., a user named
8188
<literal>postgres</literal>), although many systems are installed that way.
8289
Furthermore, the <ProductName>Postgres</ProductName> superuser should
83-
definitely not be the Unix superuser, <literal>root</literal>! In any
84-
case, all files relating to a database should belong to
90+
definitely not be the Unix superuser, <literal>root</literal>!
91+
It is safest if the <ProductName>Postgres</ProductName> superuser is an
92+
ordinary, unprivileged user so far as the surrounding Unix system is
93+
concerned.
94+
In any case, all files relating to a database should belong to
8595
this <ProductName>Postgres</ProductName> superuser.
8696
</Para>
8797
</sect1>

‎doc/src/sgml/array.sgml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.13 2001/11/03 21:42:47 tgl Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.14 2001/11/19 03:58:23 tgl Exp $ -->
22

33
<chapter id="arrays">
44
<title>Arrays</title>
@@ -19,6 +19,8 @@ CREATE TABLE sal_emp (
1919
schedule text[][]
2020
);
2121
</programlisting>
22+
As shown, an array data type is named by appending square brackets
23+
(<literal>[ ]</>) to the data type name of the array elements.
2224
The above query will create a table named
2325
<structname>sal_emp</structname> with a <type>text</type> string
2426
(<structfield>name</structfield>), a one-dimensional array of type
@@ -31,7 +33,7 @@ CREATE TABLE sal_emp (
3133

3234
<para>
3335
Now we do some <command>INSERT</command>s. Observe that to write an array
34-
value, we enclose the element values within braces and separate them
36+
value, we enclose the element values withincurlybraces and separate them
3537
by commas. If you know C, this is not unlike the syntax for
3638
initializing structures.
3739

@@ -63,6 +65,7 @@ SELECT name FROM sal_emp WHERE pay_by_quarter[1] &lt;&gt; pay_by_quarter[2];
6365
(1 row)
6466
</programlisting>
6567

68+
The array subscript numbers are written within square brackets.
6669
<productname>Postgres</productname> uses the
6770
<quote>one-based</quote> numbering convention for arrays, that is,
6871
an array of n elements starts with <literal>array[1]</literal> and
@@ -163,7 +166,7 @@ CREATE TABLE tictactoe (
163166

164167
<para>
165168
Actually, the current implementation does not enforce the declared
166-
number of dimensions either. Arrays of a particularbase type are
169+
number of dimensions either. Arrays of a particularelement type are
167170
all considered to be of the same type, regardless of size or number
168171
of dimensions.
169172
</para>
@@ -236,4 +239,13 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000;
236239
</para>
237240
</tip>
238241

242+
<note>
243+
<para>
244+
A limitation of the present array implementation is that individual
245+
elements of an array cannot be SQL NULLs. The entire array can be set
246+
to NULL, but you can't have an array with some elements NULL and some
247+
not. Fixing this is on the TODO list.
248+
</para>
249+
</note>
250+
239251
</chapter>

‎doc/src/sgml/charset.sgml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.16 2001/11/18 20:33:32 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.17 2001/11/19 03:58:24 tgl Exp $ -->
22

33
<chapter id="charset">
44
<title>Localization</>
@@ -176,11 +176,11 @@ export LANG=sv_SE
176176
for any particular database cluster, or indexes on text columns will
177177
become corrupt. <productname>Postgres</productname> enforces this
178178
by recording the values of <envar>LC_COLLATE</> and <envar>LC_CTYPE</>
179-
that are seen by <command>initdb</>. The server automatically adopts
179+
that are seen by <application>initdb</>. The server automatically adopts
180180
those two values when it is started; only the other <envar>LC_</>
181181
categories can be set from the environment at server startup.
182182
In short, only one collation order can be used in a database cluster,
183-
and it is chosen at <command>initdb</> time.
183+
and it is chosen at <application>initdb</> time.
184184
</para>
185185
</sect2>
186186

@@ -256,6 +256,18 @@ perl: warning: Falling back to the standard locale ("C").
256256
man page of your system if you are not sure.
257257
</para>
258258

259+
<para>
260+
Check that <productname>PostgreSQL</> is actually using the locale that
261+
you think it is. <envar>LC_COLLATE</> and <envar>LC_CTYPE</> settings are
262+
determined at <application>initdb</> time and cannot be changed without
263+
repeating <application>initdb</>. Other locale settings including
264+
<envar>LC_MESSAGES</> and <envar>LC_MONETARY</> are determined by the
265+
environment the postmaster is started in, and can be changed with a simple
266+
postmaster restart. You can check the <envar>LC_COLLATE</> and
267+
<envar>LC_CTYPE</> settings of
268+
a database with the <filename>contrib/pg_controldata</> utility program.
269+
</para>
270+
259271
<para>
260272
The directory <filename>src/test/locale</> contains a test suite
261273
for <productname>PostgreSQL</>'s locale support.

‎doc/src/sgml/client-auth.sgml

Lines changed: 32 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.27 2001/11/18 23:24:16 tgl Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.28 2001/11/19 03:58:24 tgl Exp $ -->
22

33
<chapter id="client-authentication">
44
<title>Client Authentication</title>
@@ -541,14 +541,34 @@ local all md5 admins
541541
In order to use <productname>Kerberos</>, support for it must be
542542
enabled at build time. Both Kerberos 4 and 5 are supported
543543
(<literal>./configure --with-krb4</> or <literal>./configure
544-
--with-krb5</> respectively).
544+
--with-krb5</> respectively), although only one version can be
545+
supported in any one build.
545546
</para>
546547

547548
<para>
548-
<productname>Postgres</> should operate like a normal Kerberos
549-
service. The name of the service principal is normally
550-
<literal>postgres</literal>, unless it was changed during the
551-
build. Make sure that your server key file is readable (and
549+
<productname>Postgres</> operates like a normal Kerberos service.
550+
The name of the service principal is
551+
<replaceable>servicename/hostname@realm</>, where
552+
<replaceable>servicename</> is <literal>postgres</literal>
553+
(unless a different service name was selected at configure time
554+
with <literal>./configure --with-krb-srvnam=whatever</>).
555+
<replaceable>hostname</> is the fully qualified domain name of the server
556+
machine. The service principal's realm is the preferred realm of the
557+
server machine.
558+
</para>
559+
560+
<para>
561+
Client principals must have their <productname>Postgres</> username as
562+
their first component, for example
563+
<replaceable>pgusername/otherstuff@realm</>.
564+
At present the realm of the client is not checked by
565+
<productname>Postgres</>; so
566+
if you have cross-realm authentication enabled, then any principal
567+
in any realm that can communicate with yours will be accepted.
568+
</para>
569+
570+
<para>
571+
Make sure that your server key file is readable (and
552572
preferably only readable) by the Postgres server account (see
553573
<xref linkend="postgres-user">). The location of the key file
554574
is specified with the <varname>krb_server_keyfile</> run time
@@ -569,49 +589,12 @@ local all md5 admins
569589
</para>
570590

571591
<para>
572-
In the <productname>Kerberos</> 5 hooks, the following assumptions
573-
are made about user and service naming:
574-
575-
<itemizedlist>
576-
<listitem>
577-
<para>
578-
User principal names (anames) are assumed to contain the actual
579-
Unix/<productname>Postgres</> user name in the first component.
580-
</para>
581-
</listitem>
582-
<listitem>
583-
<para>
584-
The <productname>Postgres</> service is assumed to be have two
585-
components, the service name and a host name, canonicalized as
586-
in Version 4 (i.e., with all domain suffixes removed).
587-
</para>
588-
</listitem>
589-
</itemizedlist>
590-
591-
<informaltable>
592-
<tgroup cols="2">
593-
<thead>
594-
<row>
595-
<entry>Parameter</>
596-
<entry>Example</>
597-
</row>
598-
</thead>
599-
<tbody>
600-
<row>
601-
<entry>user</>
602-
<entry>frew@S2K.ORG</>
603-
</row>
604-
<row>
605-
<entry>user</>
606-
<entry>aoki/HOST=miyu.S2K.Berkeley.EDU@S2K.ORG</>
607-
</row>
608-
<row>
609-
<entry>host</>
610-
<entry>postgres_dbms/ucbvax@S2K.ORG</>
611-
</row>
612-
</tbody>
613-
</tgroup>
614-
</informaltable>
592+
When connecting to the database make sure you have a ticket for a
593+
principal matching the requested database username.
594+
An example: For database username <literal>fred</>, both principal
595+
<literal>fred@EXAMPLE.COM</> and
596+
<literal>fred/users.example.com@EXAMPLE.COM</> can be
597+
used to authenticate to the database server.
615598
</para>
616599

617600
<para>

‎doc/src/sgml/datatype.sgml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.69 2001/11/12 21:04:45 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.70 2001/11/19 03:58:22 tgl Exp $
33
-->
44

55
<chapter id="datatype">
@@ -382,7 +382,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.69 2001/11/12 21:04:45 tg
382382
<entry><type>bigint</></entry>
383383
<entry>8 bytes</entry>
384384
<entry>Very large range fixed-precision</entry>
385-
<entry>about 18 decimal digits</entry>
385+
<entry>-9223372036854775807 to 9223372036854775807</entry>
386386
</row>
387387

388388
<row>
@@ -1538,22 +1538,29 @@ January 8 04:05:06 1999 PST
15381538
</indexterm>
15391539

15401540
<para>
1541-
<type>interval</type>scan bespecified with the following syntax:
1541+
<type>interval</type> valuescan bewritten with the following syntax:
15421542

15431543
<programlisting>
15441544
Quantity Unit [Quantity Unit...] [Direction]
1545-
@ Quantity Unit [Direction]
1545+
@ Quantity Unit [Quantity Unit...] [Direction]
15461546
</programlisting>
15471547

1548-
where: <literal>Quantity</literal> is ..., <literal>-1</literal>,
1549-
<literal>0</literal>, <literal>1</literal>, <literal>2</literal>, ...;
1548+
where: <literal>Quantity</literal> is an integer (possibly signed);
15501549
<literal>Unit</literal> is <literal>second</literal>,
15511550
<literal>minute</literal>, <literal>hour</literal>, <literal>day</literal>,
15521551
<literal>week</literal>, <literal>month</literal>, <literal>year</literal>,
15531552
<literal>decade</literal>, <literal>century</literal>, <literal>millennium</literal>,
15541553
or abbreviations or plurals of these units;
15551554
<literal>Direction</literal> can be <literal>ago</literal> or
1556-
empty.
1555+
empty. The at sign (<literal>@</>) is optional noise. The amounts
1556+
of different quantities are implicitly added up with appropriate
1557+
sign accounting.
1558+
</para>
1559+
1560+
<para>
1561+
Quantities of days, hours, minutes, and seconds can be specified without
1562+
explicit unit markings: for example, <literal>'1 12:59:10'</> is read
1563+
the same as <literal>'1 day 12 hours 59 min 10 sec'</>.
15571564
</para>
15581565
</sect3>
15591566

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp