Commit 66d17c3e authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Make TABLE an optional keyword, a la LOCK TABLE (gram.y fixes not yet

 committed, but will be within a week or two).
Actually include the reference page into the docs...
parent 03e5edb7
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.11 1999/08/06 13:50:29 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.12 1999/10/01 15:24:09 thomas Exp $
Postgres documentation Postgres documentation
Complete list of usable sgml source files in this directory. Complete list of usable sgml source files in this directory.
--> -->
...@@ -93,6 +93,7 @@ Complete list of usable sgml source files in this directory. ...@@ -93,6 +93,7 @@ Complete list of usable sgml source files in this directory.
<!entity selectInto system "select_into.sgml"> <!entity selectInto system "select_into.sgml">
<!entity set system "set.sgml"> <!entity set system "set.sgml">
<!entity show system "show.sgml"> <!entity show system "show.sgml">
<!entity truncate system "truncate.sgml">
<!entity unlisten system "unlisten.sgml"> <!entity unlisten system "unlisten.sgml">
<!entity update system "update.sgml"> <!entity update system "update.sgml">
<!entity vacuum system "vacuum.sgml"> <!entity vacuum system "vacuum.sgml">
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/commands.sgml,v 1.18 1999/08/06 13:50:30 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/commands.sgml,v 1.19 1999/10/01 15:24:09 thomas Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -67,6 +67,7 @@ Postgres documentation ...@@ -67,6 +67,7 @@ Postgres documentation
&selectInto; &selectInto;
&set; &set;
&show; &show;
&truncate;
&unlisten; &unlisten;
&update; &update;
&vacuum; &vacuum;
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.1 1999/09/23 17:02:28 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.2 1999/10/01 15:24:09 thomas Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -15,7 +15,7 @@ Postgres documentation ...@@ -15,7 +15,7 @@ Postgres documentation
TRUNCATE TRUNCATE
</refname> </refname>
<refpurpose> <refpurpose>
Close a cursor Empty a table
</refpurpose> </refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
...@@ -23,7 +23,7 @@ Postgres documentation ...@@ -23,7 +23,7 @@ Postgres documentation
<date>1999-07-20</date> <date>1999-07-20</date>
</refsynopsisdivinfo> </refsynopsisdivinfo>
<synopsis> <synopsis>
TRUNCATE TABLE <replaceable class="PARAMETER">table</replaceable> TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable>
</synopsis> </synopsis>
<refsect2 id="R2-SQL-TRUNCATE-1"> <refsect2 id="R2-SQL-TRUNCATE-1">
...@@ -37,10 +37,10 @@ TRUNCATE TABLE <replaceable class="PARAMETER">table</replaceable> ...@@ -37,10 +37,10 @@ TRUNCATE TABLE <replaceable class="PARAMETER">table</replaceable>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><replaceable class="PARAMETER">table</replaceable></term> <term><replaceable class="PARAMETER">name</replaceable></term>
<listitem> <listitem>
<para> <para>
The table name to truncate. The name of the table to be truncated.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -81,19 +81,24 @@ TRUNCATE ...@@ -81,19 +81,24 @@ TRUNCATE
Description Description
</title> </title>
<para> <para>
<command>TRUNCATE</command> quickly removes all rows from a table. <command>TRUNCATE</command> quickly removes all rows from a
table. It has the same effect as an unqualified
<command>DELETE</command> but since it does not actually scan the
table it is faster. This is most effective on large tables.
</para> </para>
</refsect1>
<refsect1 id="R1-SQL-TRUNCATE-2"> <refsect1 id="R1-SQL-TRUNCATE-2">
<title> <title>
Usage Usage
</title> </title>
<para> <para>
Truncate the table bigtable. Truncate the table <literal>bigtable</literal>:
</para>
<programlisting> <programlisting>
TRUNCATE TABLE bigtable; TRUNCATE TABLE bigtable;
</programlisting> </programlisting>
</para>
</refsect1> </refsect1>
<refsect1 id="R1-SQL-TRUNCATE-3"> <refsect1 id="R1-SQL-TRUNCATE-3">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment