From: Bruce Momjian Date: Wed, 16 Jul 2008 16:54:08 +0000 (+0000) Subject: Allow TRUNCATE foo, foo to succeed, per report from Nikhils. X-Git-Tag: REL8_4_BETA1~1158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=895a4bccb6663ad04b02905fcbf128e64d30abd9;p=postgresql Allow TRUNCATE foo, foo to succeed, per report from Nikhils. --- diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index b674406ffa..18a86b8f01 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -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 */