Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 0AE54EA3551 for ; Fri, 13 Jul 2012 09:00:29 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SpeXr-0000xq-Ig for pgsql-bugs@postgresql.org; Fri, 13 Jul 2012 12:00:28 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SpeXf-0008E9-5Y for pgsql-bugs@postgresql.org; Fri, 13 Jul 2012 12:00:15 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SpeXe-0002yi-Rr for pgsql-bugs@postgresql.org; Fri, 13 Jul 2012 12:00:14 +0000 Date: Fri, 13 Jul 2012 12:00:14 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6734: create table (like ...) fails if an index has a comment To: pgsql-bugs@postgresql.org From: daniele.varrazzo@gmail.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/99 X-Sequence-Number: 33575 The following bug has been logged on the website: Bug reference: 6734 Logged by: Daniele Varrazzo Email address: daniele.varrazzo@gmail.com PostgreSQL version: 9.1.4 Operating system: Linux Description: = Weird, isn't it? Test case below. = Dropping the comment, the create table command works as expected. The command fails with an: "ERROR: relation "foo2_f1_idx" already exists". begin; CREATE TABLE foo ( id serial primary key, f1 integer NOT NULL ); CREATE INDEX foo_idx1 ON foo (f1); CREATE INDEX foo_idx2 ON foo (f1) WHERE id > 10; COMMENT ON INDEX foo_idx2 IS 'whatever'; create table foo2 (like foo including all); rollback;