Re: pg_dump Add dumping of comments on index columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: higepon <higepon(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump Add dumping of comments on index columns
Date: 2009-03-24 14:56:17
Message-ID: 27676.1237906577@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Wow, I have no idea what that means. I am wondering if we should just
> remove this TODO item. We don't even support comments on indexed
> columns, so why would pg_dump need to dump it?

The system will let you do it, both cases:

regression=# create type foo as (f1 int, f2 text);
CREATE TYPE
regression=# comment on column foo.f2 is 'column of a composite type';
COMMENT
regression=# create table tt (f1 int primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tt_pkey" for table "tt"
CREATE TABLE
regression=# comment on column tt_pkey.f1 is 'column of an index';
COMMENT

and pg_dump fails to dump both cases.

Commenting on a composite-type column seems reasonable. I'm less happy
about the other because it depends on the names assigned to index
columns, which are implementation artifacts. I'd rather see us forbid
the case.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2009-03-24 15:13:28 Re: GIN fast insert
Previous Message higepon 2009-03-24 14:35:41 Re: pg_dump Add dumping of comments on index columns