summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml3
-rw-r--r--doc/src/sgml/client-auth.sgml4
-rw-r--r--doc/src/sgml/func.sgml6
-rw-r--r--doc/src/sgml/monitoring.sgml6
-rw-r--r--doc/src/sgml/postgres-fdw.sgml62
-rw-r--r--doc/src/sgml/ref/select.sgml24
-rw-r--r--doc/src/sgml/wal.sgml7
7 files changed, 101 insertions, 11 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 19fe69ef12..dca24fc070 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -5980,7 +5980,8 @@
<entry><structfield>tgconstrindid</structfield></entry>
<entry><type>oid</type></entry>
<entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
- <entry>The index supporting a unique, primary key, or referential integrity constraint</entry>
+ <entry>The index supporting a unique, primary key, referential integrity,
+ or exclusion constraint</entry>
</row>
<row>
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index 14870401fb..9b26d01061 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -83,7 +83,7 @@
Fields can contain white space if the field value is double-quoted.
Quoting one of the keywords in a database, user, or address field (e.g.,
<literal>all</> or <literal>replication</>) makes the word lose its special
- character, and just match a database, user, or host with that name.
+ meaning, and just match a database, user, or host with that name.
</para>
<para>
@@ -408,7 +408,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
<term><literal>md5</></term>
<listitem>
<para>
- Require the client to supply an MD5-encrypted password for
+ Require the client to supply a double-MD5-hashed password for
authentication.
See <xref linkend="auth-password"> for details.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 07dcba01d3..aa2b068e74 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -10282,7 +10282,7 @@ table2-mapping
<entry>
Expands a JSON array to a set of JSON values.
</entry>
- <entry><literal>json_array_elements('[1,true, [2,false]]')</literal></entry>
+ <entry><literal>SELECT * FROM json_array_elements('[1,true, [2,false]]')</literal></entry>
<entry>
<programlisting>
value
@@ -10300,11 +10300,11 @@ table2-mapping
</indexterm>
<literal>json_array_elements_text(json)</literal>
</entry>
- <entry><type>SETOF json</type></entry>
+ <entry><type>SETOF text</type></entry>
<entry>
Expands a JSON array to a set of text values.
</entry>
- <entry><literal>json_array_elements_text('["foo", "bar"]')</literal></entry>
+ <entry><literal>SELECT * FROM json_array_elements_text('["foo", "bar"]')</literal></entry>
<entry>
<programlisting>
value
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index d301d9c5c3..a37e6b6f33 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -185,9 +185,11 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<filename>pg_stat_tmp</filename> by default.
For better performance, <varname>stats_temp_directory</> can be
pointed at a RAM-based file system, decreasing physical I/O requirements.
- When the server shuts down, a permanent copy of the statistics
+ When the server shuts down cleanly, a permanent copy of the statistics
data is stored in the <filename>global</filename> subdirectory, so that
- statistics can be retained across server restarts.
+ statistics can be retained across server restarts. When recovery is
+ performed at server start (e.g. after immediate shutdown, server crash,
+ and point-in-time recovery), all statistics counters are reset.
</para>
</sect2>
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 35924f19f2..e6f6e20581 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -376,6 +376,68 @@
</sect2>
<sect2>
+ <title>Examples</title>
+
+ <para>
+ Here is an example of creating a foreign table with
+ <literal>postgres_fdw</>. First install the extension:
+ </para>
+
+<programlisting>
+CREATE EXTENSION postgres_fdw;
+</programlisting>
+
+ <para>
+ Then create a foreign server using <xref linkend="sql-createserver">.
+ In this example we wish to connect to a <productname>PostgreSQL</> server
+ on host <literal>192.83.123.89</literal> listening on
+ port <literal>5432</literal>. The database to which the connection is made
+ is named <literal>foreign_db</literal> on the remote server:
+
+<programlisting>
+CREATE SERVER foreign_server
+ FOREIGN DATA WRAPPER postgres_fdw
+ OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');
+</programlisting>
+ </para>
+
+ <para>
+ A user mapping, defined with <xref linkend="sql-createusermapping">, is
+ needed as well to identify the role that will be used on the remote
+ server:
+
+<programlisting>
+CREATE USER MAPPING FOR local_user
+ SERVER foreign_server
+ OPTIONS (user 'foreign_user', password 'password');
+</programlisting>
+ </para>
+
+ <para>
+ Now it is possible to create a foreign table with
+ <xref linkend="sql-createforeigntable">. In this example we
+ wish to access the table named <structname>some_schema.some_table</>
+ on the remote server. The local name for it will
+ be <structname>foreign_table</>:
+
+<programlisting>
+CREATE FOREIGN TABLE foreign_table (
+ id serial NOT NULL,
+ data text
+)
+ SERVER foreign_server
+ OPTIONS (schema_name 'some_schema', table_name 'some_table');
+</programlisting>
+
+ It's essential that the data types and other properties of the columns
+ declared in <command>CREATE FOREIGN TABLE</> match the actual remote table.
+ Column names must match as well, unless you attach <literal>column_name</>
+ options to the individual columns to show how they are named in the remote
+ table.
+ </para>
+ </sect2>
+
+ <sect2>
<title>Author</title>
<para>
Shigeru Hanada <email>shigeru.hanada@gmail.com</email>
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index f9f83f34f7..9a468b98c0 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -654,6 +654,12 @@ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...]
the grouped columns (or a subset thereof) are the primary key of
the table containing the ungrouped column.
</para>
+
+ <para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>GROUP BY</literal>.
+ </para>
</refsect2>
<refsect2 id="SQL-HAVING">
@@ -690,6 +696,12 @@ HAVING <replaceable class="parameter">condition</replaceable>
within aggregate functions. Such a query will emit a single row if the
<literal>HAVING</literal> condition is true, zero rows if it is not true.
</para>
+
+ <para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>HAVING</literal>.
+ </para>
</refsect2>
<refsect2 id="SQL-WINDOW">
@@ -825,6 +837,12 @@ UNBOUNDED FOLLOWING
</para>
<para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>WINDOW</literal>.
+ </para>
+
+ <para>
Window functions are described in detail in
<xref linkend="tutorial-window">,
<xref linkend="syntax-window-functions">, and
@@ -920,6 +938,12 @@ SELECT DISTINCT ON (location) location, time, report
will normally contain additional expression(s) that determine the
desired precedence of rows within each <literal>DISTINCT ON</> group.
</para>
+
+ <para>
+ Currently, <literal>FOR NO KEY UPDATE</>, <literal>FOR UPDATE</>,
+ <literal>FOR SHARE</> and <literal>FOR KEY SHARE</> cannot be
+ specified with <literal>DISTINCT</literal>.
+ </para>
</refsect2>
<refsect2 id="SQL-UNION">
diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml
index 059697e2b3..c72253227e 100644
--- a/doc/src/sgml/wal.sgml
+++ b/doc/src/sgml/wal.sgml
@@ -193,9 +193,10 @@
</listitem>
<listitem>
<para>
- Data pages are not currently checksummed, though full page images recorded
- in WAL records will be protected. Data pages have a 16-bit field available
- for future use with a data page checksum feature.
+ Data pages are not currently checksummed by default, though full page images
+ recorded in WAL records will be protected; see<link
+ linkend="app-initdb-data-checksums"><application>initdb</></link>
+ for details about enabling data page checksums.
</para>
</listitem>
<listitem>