]> granicus.if.org Git - postgresql/commitdiff
Allow TRUNCATE foo, foo to succeed, per report from Nikhils.
authorBruce Momjian <bruce@momjian.us>
Wed, 16 Jul 2008 16:54:08 +0000 (16:54 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 16 Jul 2008 16:54:08 +0000 (16:54 +0000)
src/backend/commands/tablecmds.c

index b674406ffa50efac977bad82c2979a60a533381c..18a86b8f0159a68c03d7126ce870cab171aab8d2 100644 (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
         */