From b89f3cc5c78e7b4c3e10ab39ef527b524d0d112d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 1 Jan 2022 17:02:30 -0600
Subject: [PATCH 02/11] f!0002-gtt-v64-doc.patch

---
 doc/src/sgml/ref/create_table.sgml | 42 ++++++++++++++++--------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index 408373323c..9cd5fc17f2 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -174,18 +174,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       If specified, the table is created as a temporary table.
       Optionally, <literal>GLOBAL</literal> or <literal>LOCAL</literal>
-      can be written before <literal>TEMPORARY</literal> or <literal>TEMP</literal>.
+      may be written before <literal>TEMPORARY</literal> or <literal>TEMP</literal>.
       They represent two types of temporary tables supported by <productname>PostgreSQL</productname>:
-      global temporary table and local temporary table. Without specified
-      GLOBAL or LOCAL, a local temporary table is created by default.
+      global temporary table and local temporary table. If neither
+      GLOBAL or LOCAL is specified, a local temporary table is created by default.
      </para>
 
     <para>
-     Both types of temporary tablesâ data are truncated at the
+     Data of both types of temporary tables is truncated at the
      end of a session or optionally at the end of the current transaction.
-     (see <literal>ON COMMIT</literal> below). For global temporary table,
-     its schema is reserved and reused by future sessions or transactions.
-     For local temporary table, both its data and its schema are dropped.
+     (see <literal>ON COMMIT</literal> below). For a global temporary table,
+     its table definition is preserved and reused by future sessions or transactions.
+     For a local temporary table, both its data and its table definition are dropped.
     </para>
 
     <variablelist>
@@ -194,10 +194,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       <listitem>
        <para>
         Global temporary table are defined just once and automatically exist
-        (starting with empty contents) in every session that needs them.
-        The schema definition of temporary tables is persistent and shared among sessions.
-        However, the data in temporary tables are kept private to sessions themselves,
-        even though they use same name and same schema.
+        (initially with empty contents) in every session.
+        The schema definition of a temporary table is persistent and common to all sessions.
+        However, the data in temporary tables is private to each sessions,
+        even though they share the same name and same table definition.
        </para>
       </listitem>
      </varlistentry>
@@ -206,15 +206,15 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       <term><literal>Local Temporary Table</literal></term>
      <listitem>
      <para>
-      Local temporary table are automatically dropped at the end of a
-      session (include schema and data). Future sessions need to create
-      their own temporary tables when they are used.
+      Local temporary tables are automatically dropped at the end of a
+      session (include table definition and data). Future sessions need to create
+      their own temporary tables before using them.
      </para>
      <para>
-      The default search_path includes the temporary schema first and so
-      identically named existing permanent tables are not chosen for new plans
-      while the temporary table exists, unless they are referenced
-      with schema-qualified names. Any indexes created on a temporary
+      The default <varname>search_path</varname> includes the temporary schema first, and so
+      identically-named, permanent tables of the same name as a temporary table are not chosen for new plans
+      so long as the temporary table exists, unless the permanent table is referenced
+      with a schema-qualified name. Any indexes created on a temporary
       table are automatically temporary as well.
      </para>
      </listitem>
@@ -229,9 +229,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      table is going to be used in complex queries, it is wise to run
      <command>ANALYZE</command> on the temporary table after it is populated.
     </para>
+
     <para>
-     The Temporary table resembles the SQL standard, but has some differences.
-     see <xref linkend="sql-createtable-compatibility"/> below.
+     The temporary table resembles the behavior defined in the SQL standard,
+     but has some differences.
+     See <xref linkend="sql-createtable-compatibility"/> below.
     </para>
 
     </listitem>
-- 
2.17.1

