Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6d99dbb0
Commit
6d99dbb0
authored
Apr 14, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify description of our deviation from standard for temp tables,
per suggestion from Mike Sykes.
parent
810e0b98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table.sgml
+25
-17
No files found.
doc/src/sgml/ref/create_table.sgml
View file @
6d99dbb0
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.6
3 2003/03/25 16:15:39 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.6
4 2003/04/14 15:24:46 tgl
Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -826,24 +826,32 @@ CREATE TABLE distributors (
...
@@ -826,24 +826,32 @@ CREATE TABLE distributors (
<title>Temporary Tables</title>
<title>Temporary Tables</title>
<para>
<para>
In addition to the local temporary table, SQL92 also defines a
Although the syntax of <literal>CREATE TEMPORARY TABLE</literal>
<literal>CREATE GLOBAL TEMPORARY TABLE</literal> statement.
resembles that of SQL92, the effect is not the same. In the standard,
Global temporary tables are also visible to other sessions.
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.
<productname>PostgreSQL</productname> does not have modules, and
requires each session to issue its own <literal>CREATE TEMPORARY
TABLE</literal> command for each temporary table to be used.
</para>
</para>
<note>
<para>
<para>
For temporary tables, there is an optional <literal>ON COMMIT</literal> clause:
The spec-mandated behavior of temporary tables is widely ignored.
<synopsis>
<productname>PostgreSQL</productname>'s behavior on this point is similar
CREATE { GLOBAL | LOCAL } TEMPORARY TABLE <replaceable class="parameter">table</replaceable> ( <replaceable class="parameter">...</replaceable> ) [ ON COMMIT { DELETE | PRESERVE } ROWS ]
to that of several other RDBMSs.
</synopsis>
</para>
</note>
The <literal>ON COMMIT</literal> clause specifies whether or not
<para>
the temporary table should be emptied of rows whenever
The optional <literal>ON COMMIT</literal> clause for temporary tables
<command>COMMIT</command> is executed. If the <literal>ON
also resembles SQL92, but has some differences.
COMMIT</> clause is omitted, SQL92 specifies that the default is
If the <literal>ON COMMIT</> clause is omitted, SQL92 specifies that the
<literal>ON COMMIT DELETE ROWS</>. However, the behavior of
default behavior is <literal>ON COMMIT DELETE ROWS</>. However, the
<productname>PostgreSQL</productname> is always like <literal>ON
default behavior in <productname>PostgreSQL</productname> is
COMMIT PRESERVE ROWS</literal>.
<literal>ON COMMIT PRESERVE ROWS</literal>. The <literal>ON COMMIT
DROP</literal> option does not exist in SQL92 at all.
</para>
</para>
</refsect2>
</refsect2>
...
@@ -854,7 +862,7 @@ CREATE { GLOBAL | LOCAL } TEMPORARY TABLE <replaceable class="parameter">table</
...
@@ -854,7 +862,7 @@ CREATE { GLOBAL | LOCAL } TEMPORARY TABLE <replaceable class="parameter">table</
The <literal>NULL</> <quote>constraint</quote> (actually a
The <literal>NULL</> <quote>constraint</quote> (actually a
non-constraint) is a <productname>PostgreSQL</productname>
non-constraint) is a <productname>PostgreSQL</productname>
extension to SQL92 that is included for compatibility with some
extension to SQL92 that is included for compatibility with some
other RDBMS (and for symmetry with the <literal>NOT
other RDBMS
s
(and for symmetry with the <literal>NOT
NULL</literal> constraint). Since it is the default for any
NULL</literal> constraint). Since it is the default for any
column, its presence is simply noise.
column, its presence is simply noise.
</para>
</para>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment