From 66d17c3e2610a9b96509fbfa403280d44fc462d2 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" <lockhart@fourpalms.org> Date: Fri, 1 Oct 1999 15:24:09 +0000 Subject: [PATCH] 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... --- doc/src/sgml/ref/allfiles.sgml | 3 ++- doc/src/sgml/ref/commands.sgml | 3 ++- doc/src/sgml/ref/truncate.sgml | 27 ++++++++++++++++----------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index 50e8c89490d..d82a9be53f5 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -1,5 +1,5 @@ <!-- -$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 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 set system "set.sgml"> <!entity show system "show.sgml"> +<!entity truncate system "truncate.sgml"> <!entity unlisten system "unlisten.sgml"> <!entity update system "update.sgml"> <!entity vacuum system "vacuum.sgml"> diff --git a/doc/src/sgml/ref/commands.sgml b/doc/src/sgml/ref/commands.sgml index bc16b4cf2a9..9402b29f6ac 100644 --- a/doc/src/sgml/ref/commands.sgml +++ b/doc/src/sgml/ref/commands.sgml @@ -1,5 +1,5 @@ <!-- -$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 --> @@ -67,6 +67,7 @@ Postgres documentation &selectInto; &set; &show; + &truncate; &unlisten; &update; &vacuum; diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml index 998f826d9cf..0459c929218 100644 --- a/doc/src/sgml/ref/truncate.sgml +++ b/doc/src/sgml/ref/truncate.sgml @@ -1,5 +1,5 @@ <!-- -$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 --> @@ -15,7 +15,7 @@ Postgres documentation TRUNCATE </refname> <refpurpose> - Close a cursor + Empty a table </refpurpose> </refnamediv> <refsynopsisdiv> @@ -23,7 +23,7 @@ Postgres documentation <date>1999-07-20</date> </refsynopsisdivinfo> <synopsis> -TRUNCATE TABLE <replaceable class="PARAMETER">table</replaceable> +TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable> </synopsis> <refsect2 id="R2-SQL-TRUNCATE-1"> @@ -37,10 +37,10 @@ TRUNCATE TABLE <replaceable class="PARAMETER">table</replaceable> <variablelist> <varlistentry> - <term><replaceable class="PARAMETER">table</replaceable></term> + <term><replaceable class="PARAMETER">name</replaceable></term> <listitem> <para> - The table name to truncate. + The name of the table to be truncated. </para> </listitem> </varlistentry> @@ -81,19 +81,24 @@ TRUNCATE Description </title> <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> - + </refsect1> + <refsect1 id="R1-SQL-TRUNCATE-2"> <title> Usage </title> <para> - Truncate the table bigtable. - </para> - <programlisting> + Truncate the table <literal>bigtable</literal>: + + <programlisting> TRUNCATE TABLE bigtable; - </programlisting> + </programlisting> + </para> </refsect1> <refsect1 id="R1-SQL-TRUNCATE-3"> -- GitLab