From 895a4bccb6663ad04b02905fcbf128e64d30abd9 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 16 Jul 2008 16:54:08 +0000 Subject: [PATCH] Allow TRUNCATE foo, foo to succeed, per report from Nikhils. --- src/backend/commands/tablecmds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 */ -- 2.40.0