Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 4AC4FEA3551 for ; Fri, 13 Jul 2012 12:11:55 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SphX8-00047w-Lb for pgsql-bugs@postgresql.org; Fri, 13 Jul 2012 15:11:54 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q6DFBfbn001523; Fri, 13 Jul 2012 11:11:41 -0400 (EDT) From: Tom Lane To: Daniele Varrazzo cc: Ryan Kelly , pgsql-bugs@postgresql.org Subject: Re: BUG #6734: create table (like ...) fails if an index has a comment In-reply-to: References: <20120713132419.GB2369@llserver.lakeliving.com> Comments: In-reply-to Daniele Varrazzo message dated "Fri, 13 Jul 2012 15:52:59 +0100" Date: Fri, 13 Jul 2012 11:11:41 -0400 Message-ID: <1522.1342192301@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/105 X-Sequence-Number: 33581 Daniele Varrazzo writes: > Wouldn't it be better to call the indexes NEWTABLE_OLDINDEXNAME? Then the CREATE LIKE command would fail altogether if that name were already taken. Postponing the selection of the index name to the time when DefineIndex runs is really the only safe thing. regards, tom lane