Skip to content

Commit 4d5169e

Browse files
committed
Merge PostgreSQL 9.2.8 document into Postgres-XC 1.0.4
1 parent 6e9c7a6 commit 4d5169e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+11273
-697
lines changed

doc-xc/src/sgml/.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
/man7/
77
/man-stamp
88
# Other popular build targets
9-
/HISTORY
109
/INSTALL
11-
/regress_README
1210
/postgres-US.pdf
1311
/postgres-A4.pdf
1412
/postgres.html
@@ -22,9 +20,7 @@
2220
/HTML.index
2321
# Assorted byproducts from building the above
2422
/postgres.xml
25-
/HISTORY.html
2623
/INSTALL.html
27-
/regress_README.html
2824
/postgres-US.aux
2925
/postgres-US.log
3026
/postgres-US.out

doc-xc/src/sgml/Makefile

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -231,27 +231,23 @@ INC_LIST = -I PG -I EN
231231
##
232232

233233
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
234+
ICONV = iconv
234235
LYNX = lynx
235236

236-
INSTALL HISTORY regress_README: % : %.html
237+
# The documentation may contain non-ASCII characters (mostly for
238+
# contributor names), which lynx converts to the encoding determined
239+
# by the current locale. To get text output that is deterministic and
240+
# easily readable by everyone, we make lynx produce LATIN1 and then
241+
# convert that to ASCII with transliteration for the non-ASCII characters.
242+
# Official releases were historically built on FreeBSD, which has limited
243+
# locale support and is very picky about locale name spelling. The
244+
# below has been finely tuned to run on FreeBSD and Linux/glibc.
245+
INSTALL: % : %.html
237246
$(PERL) -p -e 's/<H(1|2)$$/<H\1 align=center/g' $< | $(LYNX) -force_html -dump -nolist -stdin > $@
238247

239248
INSTALL.html: standalone-install.sgml installation.sgml version.sgml
240249
$(JADE.text) -V nochunks standalone-install.sgml installation.sgml > $@
241250

242-
HISTORY.html: generate_history.pl $(wildcard $(srcdir)/release*.sgml)
243-
$(PERL) $< "$(srcdir)" release.sgml >tempfile_HISTORY.sgml
244-
$(JADE.text) -V nochunks tempfile_HISTORY.sgml > $@
245-
rm tempfile_HISTORY.sgml
246-
247-
regress_README.html: regress.sgml
248-
( echo '<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.2//EN" ['; \
249-
echo '<!ENTITY % standalone-ignore "IGNORE">'; \
250-
echo '<!ENTITY % standalone-include "INCLUDE"> ]>'; \
251-
cat $< ) >tempfile_regress_README.sgml
252-
$(JADE.text) -V nochunks tempfile_regress_README.sgml > $@
253-
rm tempfile_regress_README.sgml
254-
255251

256252
##
257253
## XSLT processing
@@ -384,13 +380,13 @@ check-tabs:
384380
# This allows removing some files from the distribution tarballs while
385381
# keeping the dependencies satisfied.
386382
.SECONDARY: postgres.xml $(GENERATED_SGML) HTML.index
387-
.SECONDARY: INSTALL.html HISTORY.html regress_README.html
383+
.SECONDARY: INSTALL.html
388384
.SECONDARY: %-A4.tex-ps %-US.tex-ps %-A4.tex-pdf %-US.tex-pdf
389385

390386
clean:
391387
# text --- these are shipped, but not in this directory
392-
rm -f INSTALL HISTORY regress_README
393-
rm -f INSTALL.html HISTORY.html regress_README.html
388+
rm -f INSTALL
389+
rm -f INSTALL.html
394390
# single-page output
395391
rm -f postgres.html postgres.txt
396392
# print

doc-xc/src/sgml/backup.sgmlin

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,11 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
13221322
Please remember to add error handling to your backup scripts.
13231323
</para>
13241324

1325+
</sect3>
1326+
1327+
<sect3 id="compressed-archive-logs">
1328+
<title>Compressed Archive Logs</title>
1329+
13251330
<para>
13261331
If archive storage size is a concern, use <application>pg_compresslog</>,
13271332
<ulink url="http://pglesslog.projects.postgresql.org"></ulink>, to

doc-xc/src/sgml/catalogs.sgmlin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4669,7 +4669,7 @@
46694669
<entry><structfield>ev_attr</structfield></entry>
46704670
<entry><type>int2</type></entry>
46714671
<entry></entry>
4672-
<entry>The column this rule is for (currently, always zero to
4672+
<entry>The column this rule is for (currently, always -1 to
46734673
indicate the whole table)</entry>
46744674
</row>
46754675

doc-xc/src/sgml/charset.sgmlin

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,17 +1606,6 @@ RESET client_encoding;
16061606
systems.
16071607

16081608
<variablelist>
1609-
<varlistentry>
1610-
<term><ulink url="http://www.i18ngurus.com/docs/984813247.html"></ulink></term>
1611-
1612-
<listitem>
1613-
<para>
1614-
An extensive collection of documents about character sets, encodings,
1615-
and code pages.
1616-
</para>
1617-
</listitem>
1618-
</varlistentry>
1619-
16201609
<varlistentry>
16211610
<term><citetitle>CJKV Information Processing: Chinese, Japanese, Korean &amp; Vietnamese Computing</citetitle></term>
16221611

doc-xc/src/sgml/config.sgmlin

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,12 +2108,16 @@ SET ENABLE_SEQSCAN TO OFF;
21082108
</indexterm>
21092109
<listitem>
21102110
<para>
2111-
Specifies the maximum number of concurrent connections from standby
2112-
servers or streaming base backup clients (i.e., the maximum number of
2113-
simultaneously running WAL sender
2114-
processes). The default is zero. This parameter can only be set at
2115-
server start. <varname>wal_level</> must be set to <literal>archive</>
2116-
or <literal>hot_standby</> to allow connections from standby servers.
2111+
Specifies the maximum number of concurrent connections from
2112+
standby servers or streaming base backup clients (i.e., the
2113+
maximum number of simultaneously running WAL sender
2114+
processes). The default is zero, meaning replication is
2115+
disabled. WAL sender processes count towards the total number
2116+
of connections, so the parameter cannot be set higher than
2117+
<xref linkend="guc-max-connections">. This parameter can only
2118+
be set at server start. <varname>wal_level</> must be set
2119+
to <literal>archive</> or <literal>hot_standby</> to allow
2120+
connections from standby servers.
21172121
</para>
21182122
</listitem>
21192123
</varlistentry>
@@ -4904,9 +4908,11 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
49044908
<para>
49054909
This parameter is normally on. When set to <literal>off</>, it
49064910
disables validation of the function body string during <xref
4907-
linkend="sql-createfunction">. Disabling validation is
4908-
occasionally useful to avoid problems such as forward references
4909-
when restoring function definitions from a dump.
4911+
linkend="sql-createfunction">. Disabling validation avoids side
4912+
effects of the validation process and avoids false positives due
4913+
to problems such as forward references. Set this parameter
4914+
to <literal>off</> before loading functions on behalf of other
4915+
users; <application>pg_dump</> does so automatically.
49104916
<!## XC>
49114917
<note>
49124918
<para>
@@ -5293,6 +5299,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
52935299
partially-significant digits; this is especially useful for dumping
52945300
float data that needs to be restored exactly. Or it can be set
52955301
negative to suppress unwanted digits.
5302+
See also <xref linkend="datatype-float">.
52965303
</para>
52975304
</listitem>
52985305
</varlistentry>
@@ -5592,7 +5599,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
55925599
just wait on the lock for a while before checking for a
55935600
deadlock. Increasing this value reduces the amount of time
55945601
wasted in needless deadlock checks, but slows down reporting of
5595-
real deadlock errors. The default is one second (<literal>1s</>),
5602+
real deadlock errors. The default is one second nheritance(<literal>1s</>),
55965603
which is probably about the smallest value you would want in
55975604
practice. On a heavily loaded server you might want to raise it.
55985605
Ideally the setting should exceed your typical transaction time,
@@ -5872,7 +5879,23 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
58725879
<indexterm><primary>inheritance</></>
58735880
<listitem>
58745881
<para>
5875-
This controls the inheritance semantics. If turned <literal>off</>,
5882+
This setting controls whether undecorated table references are
5883+
considered to include inheritance child tables. The default is
5884+
<literal>on</>, which means child tables are included (thus,
5885+
a <literal>*</> suffix is assumed by default). If turned
5886+
<literal>off</>, child tables are not included (thus, an
5887+
<literal>ONLY</literal> prefix is assumed). The SQL standard
5888+
requires child tables to be included, so the <literal>off</> setting
5889+
is not spec-compliant, but it is provided for compatibility with
5890+
<productname>PostgreSQL</> releases prior to 7.1.
5891+
See <xref linkend="ddl-inherit"> for more information.
5892+
</para>
5893+
5894+
<para>
5895+
Turning <varname>sql_inheritance</> off is deprecated, because that
5896+
behavior has been found to be error-prone as well as contrary to SQL
5897+
standard. Discussions of inheritance behavior elsewhere in this
5898+
manual generally assume that it is <literal>on</>.
58765899
subtables are not accessed by various commands by default; basically
58775900
an implied <literal>ONLY</literal> key word. This was added for
58785901
compatibility with releases prior to 7.1. See

doc-xc/src/sgml/datatype.sgmlin

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,17 @@ NUMERIC
696696
from zero will cause an underflow error.
697697
</para>
698698

699+
<note>
700+
<para>
701+
The <xref linkend="guc-extra-float-digits"> setting controls the
702+
number of extra significant digits included when a floating point
703+
value is converted to text for output. With the default value of
704+
<literal>0</literal>, the output is the same on every platform
705+
supported by PostgreSQL. Increasing it will produce output that
706+
more accurately represents the stored value, but may be unportable.
707+
</para>
708+
</note>
709+
699710
<indexterm>
700711
<primary>not a number</primary>
701712
<secondary>double precision</secondary>
@@ -841,6 +852,20 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab
841852
the column, so that it will be dropped if the column or table is dropped.
842853
</para>
843854

855+
<note>
856+
<para>
857+
Because <type>smallserial</type>, <type>serial</type> and
858+
<type>bigserial</type> are implemented using sequences, there may
859+
be "holes" or gaps in the sequence of values which appears in the
860+
column, even if no rows are ever deleted. A value allocated
861+
from the sequence is still "used up" even if a row containing that
862+
value is never successfully inserted into the table column. This
863+
may happen, for example, if the inserting transaction rolls back.
864+
See <literal>nextval()</literal> in <xref linkend="functions-sequence">
865+
for details.
866+
</para>
867+
</note>
868+
844869
<note>
845870
<para>
846871
Prior to <productname>PostgreSQL</productname> 7.3, <type>serial</type>

doc-xc/src/sgml/ddl.sgmlin

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,6 +2367,23 @@ SELECT name, altitude
23672367
<literal>ONLY</literal> keyword.
23682368
</para>
23692369

2370+
<para>
2371+
You can also write the table name with a trailing <literal>*</>
2372+
to explicitly specify that descendant tables are included:
2373+
2374+
<programlisting>
2375+
SELECT name, altitude
2376+
FROM cities*
2377+
WHERE altitude &gt; 500;
2378+
</programlisting>
2379+
2380+
Writing <literal>*</> is not necessary, since this behavior is
2381+
the default (unless you have changed the setting of the
2382+
<xref linkend="guc-sql-inheritance"> configuration option).
2383+
However writing <literal>*</> might be useful to emphasize that
2384+
additional tables will be searched.
2385+
</para>
2386+
23702387
<para>
23712388
In some cases you might wish to know which table a particular row
23722389
originated from. There is a system column called
@@ -2524,15 +2541,15 @@ VALUES ('New York', NULL, NULL, 'NY');
25242541
data modification, or schema modification
25252542
(e.g., <literal>SELECT</literal>, <literal>UPDATE</literal>, <literal>DELETE</literal>,
25262543
most variants of <literal>ALTER TABLE</literal>, but
2527-
not <literal>INSERT</literal> and <literal>ALTER TABLE ...
2544+
not <literal>INSERT</literal> or <literal>ALTER TABLE ...
25282545
RENAME</literal>) typically default to including child tables and
25292546
support the <literal>ONLY</literal> notation to exclude them.
25302547
Commands that do database maintenance and tuning
25312548
(e.g., <literal>REINDEX</literal>, <literal>VACUUM</literal>)
2532-
typically only work on individual, physical tables and do no
2549+
typically only work on individual, physical tables and do not
25332550
support recursing over inheritance hierarchies. The respective
2534-
behavior of each individual command is documented in the reference
2535-
part (<xref linkend="sql-commands">).
2551+
behavior of each individual command is documented in its reference
2552+
page (<xref linkend="sql-commands">).
25362553
</para>
25372554

25382555
<para>
@@ -2582,18 +2599,6 @@ VALUES ('New York', NULL, NULL, 'NY');
25822599
inheritance is useful for your application.
25832600
</para>
25842601

2585-
<note>
2586-
<title>Deprecated</title>
2587-
<para>
2588-
In releases of <productname>PostgreSQL</productname> prior to 7.1, the
2589-
default behavior was not to include child tables in queries. This was
2590-
found to be error prone and also in violation of the SQL
2591-
standard. You can get the pre-7.1 behavior by turning off the
2592-
<xref linkend="guc-sql-inheritance"> configuration
2593-
option.
2594-
</para>
2595-
</note>
2596-
25972602
</sect2>
25982603
</sect1>
25992604

doc-xc/src/sgml/docguide.sgmlin

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,26 +1041,19 @@ save_size.pdfjadetex = 15000
10411041

10421042
&common;
10431043
<para>
1044-
Several files are distributed as plain text, for reading during
1045-
the installation process. The <filename>INSTALL</filename> file
1044+
The installation instructions are also distributed as plain text,
1045+
in case they are needed in a situation where better reading tools
1046+
are not available. The <filename>INSTALL</filename> file
10461047
corresponds to <xref linkend="installation">, with some minor
10471048
changes to account for the different context. To recreate the
10481049
file, change to the directory <filename>doc/src/sgml</filename>
1049-
and enter <userinput>gmake INSTALL</userinput>. This will create
1050-
a file <filename>INSTALL.html</filename> that can be saved as text
1051-
with <productname>Netscape Navigator</productname> and put into
1052-
the place of the existing file.
1053-
<productname>Netscape</productname> seems to offer the best
1054-
quality for <acronym>HTML</acronym> to text conversions (over
1055-
<application>lynx</application> and
1056-
<application>w3m</application>).
1050+
and enter <userinput>gmake INSTALL</userinput>.
10571051
</para>
10581052

10591053
<para>
1060-
The file <filename>HISTORY</filename> can be created similarly,
1061-
using the command <userinput>gmake HISTORY</userinput>. For the
1062-
file <filename>src/test/regress/README</filename> the command is
1063-
<userinput>gmake regress_README</userinput>.
1054+
In the past, the release notes and regression testing instructions
1055+
were also distributed as plain text, but this practice has been
1056+
discontinued.
10641057
</para>
10651058
</sect2>
10661059

doc-xc/src/sgml/ecpg.sgmlin

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -951,20 +951,6 @@ struct varchar_var { int len; char arr[180]; } var;
951951
is used.
952952
</para>
953953

954-
<para>
955-
Two or more <type>VARCHAR</type> host variables cannot be defined
956-
in single line statement. The following code will confuse
957-
the <command>ecpg</command> preprocessor:
958-
<programlisting>
959-
VARCHAR v1[128], v2[128]; /* WRONG */
960-
</programlisting>
961-
Two variables should be defined in separate statements like this:
962-
<programlisting>
963-
VARCHAR v1[128];
964-
VARCHAR v2[128];
965-
</programlisting>
966-
</para>
967-
968954
<para>
969955
<type>VARCHAR</type> can be written in upper or lower case, but
970956
not in mixed case.
@@ -7742,9 +7728,9 @@ VAR <replaceable>varname</replaceable> IS <replaceable>ctype</replaceable>
77427728
<title>Description</title>
77437729

77447730
<para>
7745-
The <command>VAR</command> command defines a host variable. It
7746-
is equivalent to an ordinary C variable definition inside a
7747-
declare section.
7731+
The <command>VAR</command> command assigns a new C data type
7732+
to a host variable. The host variable must be previously
7733+
declared in a declare section.
77487734
</para>
77497735
</refsect1>
77507736

@@ -7776,8 +7762,10 @@ VAR <replaceable>varname</replaceable> IS <replaceable>ctype</replaceable>
77767762
<title>Examples</title>
77777763

77787764
<programlisting>
7779-
EXEC SQL VAR vc IS VARCHAR[10];
7780-
EXEC SQL VAR boolvar IS bool;
7765+
Exec sql begin declare section;
7766+
short a;
7767+
exec sql end declare section;
7768+
EXEC SQL VAR a IS int;
77817769
</programlisting>
77827770
</refsect1>
77837771

0 commit comments

Comments
 (0)