11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.65 2003/04/1415:40:02 tgl Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.66 2003/04/1418:08:58 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -828,14 +828,14 @@ CREATE TABLE distributors (
828828 <para>
829829 Although the syntax of <literal>CREATE TEMPORARY TABLE</literal>
830830 resembles that of SQL92, the effect is not the same. In the standard,
831- temporary tables are associated with modules; a temporary table is created
832- just once and automatically exists (starting with empty contents) in every
833- session that uses the module.
834- <productname>PostgreSQL</productname> does not have modules, and
831+ temporary tables are defined just once and automatically exist (starting
832+ with empty contents) in every session that needs them.
833+ <productname>PostgreSQL</productname> instead
835834 requires each session to issue its own <literal>CREATE TEMPORARY
836- TABLE</literal> command for each temporary table to be used.
837- The notion of <literal>GLOBAL</literal> temporary tables found in SQL92
838- is not in <productname>PostgreSQL</productname> at all.
835+ TABLE</literal> command for each temporary table to be used. This allows
836+ different sessions to use the same temporary table name for different
837+ purposes, whereas the spec's approach constrains all instances of a
838+ given temporary table name to have the same table structure.
839839 </para>
840840
841841 <note>
@@ -846,14 +846,21 @@ CREATE TABLE distributors (
846846 </para>
847847 </note>
848848
849+ <para>
850+ SQL92's distinction between global and local temporary tables
851+ is not in <productname>PostgreSQL</productname>, since that distinction
852+ depends on the concept of modules, which
853+ <productname>PostgreSQL</productname> does not have.
854+ </para>
855+
849856 <para>
850857 The <literal>ON COMMIT</literal> clause for temporary tables
851858 also resembles SQL92, but has some differences.
852859 If the <literal>ON COMMIT</> clause is omitted, SQL92 specifies that the
853860 default behavior is <literal>ON COMMIT DELETE ROWS</>. However, the
854861 default behavior in <productname>PostgreSQL</productname> is
855862 <literal>ON COMMIT PRESERVE ROWS</literal>. The <literal>ON COMMIT
856- DROP</literal> option does not exist in SQL92 at all .
863+ DROP</literal> option does not exist in SQL92.
857864 </para>
858865 </refsect2>
859866