From f07b9689c93084016ecd825258c125aa9f69f962 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 27 Jan 2005 03:19:37 +0000 Subject: Generalize TRUNCATE to support truncating multiple tables in one command. This is useful because we can allow truncation of tables referenced by foreign keys, so long as the referencing table is truncated in the same command. Alvaro Herrera --- src/backend/parser/gram.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/parser') diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 766fe912d55..757a17e891b 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.481 2004/12/31 22:00:27 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.482 2005/01/27 03:17:59 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -2681,15 +2681,15 @@ attrs: '.' attr_name /***************************************************************************** * * QUERY: - * truncate table relname + * truncate table relname1, relname2, ... * *****************************************************************************/ TruncateStmt: - TRUNCATE opt_table qualified_name + TRUNCATE opt_table qualified_name_list { TruncateStmt *n = makeNode(TruncateStmt); - n->relation = $3; + n->relations = $3; $$ = (Node *)n; } ; -- cgit v1.2.3