Allow TRUNCATE foo, foo to succeed, per report from Nikhils.

This commit is contained in:
Bruce Momjian 2008-07-16 16:54:08 +00:00
parent 9c8f74917d
commit 895a4bccb6
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.259 2008/06/19 00:46:04 alvherre Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.260 2008/07/16 16:54:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -762,6 +762,9 @@ ExecuteTruncate(TruncateStmt *stmt)
ResultRelInfo *resultRelInfo;
ListCell *cell;
/* make list unique */
stmt->relations = list_union(NIL, stmt->relations);
/*
* Open, exclusive-lock, and check all the explicitly-specified relations
*/