Another try at correctly explaining the difference between Postgres and
authorTom Lane
Mon, 14 Apr 2003 18:08:58 +0000 (18:08 +0000)
committerTom Lane
Mon, 14 Apr 2003 18:08:58 +0000 (18:08 +0000)
SQL92 temp tables.  Possibly I got it right this time.

doc/src/sgml/ref/create_table.sgml

index c4f5ea138cfdcabeb66b326c19ba19720cb9fc30..9ee71705f96baac0516be8bbe2f710d71049f614 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -828,14 +828,14 @@ CREATE TABLE distributors (
    
     Although the syntax of CREATE TEMPORARY TABLE
     resembles that of SQL92, the effect is not the same.  In the standard,
-    temporary tables are associated with modules; a temporary table is created
-    just once and automatically exists (starting with empty contents) in every
-    session that uses the module.
-    PostgreSQL does not have modules, and
+    temporary tables are defined just once and automatically exist (starting
+    with empty contents) in every session that needs them.
+    PostgreSQL instead
     requires each session to issue its own CREATE TEMPORARY
-    TABLE command for each temporary table to be used.
-    The notion of GLOBAL temporary tables found in SQL92
-    is not in PostgreSQL at all.
+    TABLE command for each temporary table to be used.  This allows
+    different sessions to use the same temporary table name for different
+    purposes, whereas the spec's approach constrains all instances of a
+    given temporary table name to have the same table structure.
    
 
    
@@ -846,6 +846,13 @@ CREATE TABLE distributors (
     
    
 
+   
+    SQL92's distinction between global and local temporary tables
+    is not in PostgreSQL, since that distinction
+    depends on the concept of modules, which
+    PostgreSQL does not have.
+   
+
    
     The ON COMMIT clause for temporary tables
     also resembles SQL92, but has some differences.
@@ -853,7 +860,7 @@ CREATE TABLE distributors (
     default behavior is ON COMMIT DELETE ROWS.  However, the
     default behavior in PostgreSQL is
     ON COMMIT PRESERVE ROWS.  The ON COMMIT
-    DROP option does not exist in SQL92 at all.
+    DROP option does not exist in SQL92.