Clarify temporary table name shadowing in CREATE TABLE docs
authorMagnus Hagander <magnus@hagander.net>
Mon, 2 Nov 2020 14:00:24 +0000 (15:00 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 2 Nov 2020 14:00:24 +0000 (15:00 +0100)
Author: David Johnston

doc/src/sgml/ref/create_table.sgml

index fd6777ae0192c9f0ad3b91ab996aa6b6a098efdb..bc59a2d77ddb75e7e5d78b08c67c1e493780be1f 100644 (file)
@@ -171,8 +171,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       If specified, the table is created as a temporary table.
       Temporary tables are automatically dropped at the end of a
       session, or optionally at the end of the current transaction
-      (see <literal>ON COMMIT</literal> below).  Existing permanent
-      tables with the same name are not visible to the current session
+      (see <literal>ON COMMIT</literal> below).  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
       table are automatically temporary as well.