Re: BUG #6734: create table (like ...) fails if an index has a comment - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6734: create table (like ...) fails if an index has a comment
Date
Msg-id 13615.1342459661@sss.pgh.pa.us
Whole thread Raw
In response to BUG #6734: create table (like ...) fails if an index has a comment  (daniele.varrazzo@gmail.com)
List pgsql-bugs
daniele.varrazzo@gmail.com writes:
> 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);

I've applied a fix for this in 9.2 and up.  The issue exists since
CREATE TABLE LIKE grew the ability to copy comments, in 9.0, but
it seems too risky to fix in already-released branches.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Noah Misch
Date:
Subject: Re: Re: BUG #6712: PostgreSQL 9.2 beta2: alter table drop constraint does not work on inherited master table
Next
From: Mike Wilson
Date:
Subject: Re: BUG #6733: All Tables Empty After pg_upgrade (PG 9.2.0 beta 2)