summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-01-27 03:19:37 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-01-27 03:19:37 +0000
commitf07b9689c93084016ecd825258c125aa9f69f962 (patch)
tree1079f22e2b1a2fd8c04ccce1c78dbed99ffd58bb /src/backend/parser
parent4fe201237faef8f30b395f1c5b350ce393f95ad3 (diff)
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
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y8
1 files changed, 4 insertions, 4 deletions
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;
}
;