Re: LIKE INCLUDING COMMENTS code is a flight of fancy

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: LIKE INCLUDING COMMENTS code is a flight of fancy
Date: 2009-12-22 20:14:15
Message-ID: 29931.1261512855@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I suggest that we might want to just
>> rip out the support for copying comments on indexes.

> We have two related ToDo items below. They are a bit inconsintent,
> but they mean we should forbid COMMENT on columns of an index,
> or must have full-support of the feature.

> Which direction should we go? As for me, forbidding comments on index
> columns seems to be a saner way because index can have arbitrary key
> names in some cases.

> - Forbid COMMENT on columns of an index
> Postgres currently allows comments to be placed on the columns of
> an index, but pg_dump doesn't handle them and the column names
> themselves are implementation-dependent.
> http://archives.postgresql.org/message-id/27676.1237906577@sss.pgh.pa.us

> - pg_dump / pg_restore: Add dumping of comments on index columns and
> composite type columns
> http://archives.postgresql.org/pgsql-hackers/2009-03/msg00931.php
> (XXX: Comments on composite type columns can work now?)

I'm for forbidding comments on index columns. The amount of work
required to support the feature fully seems far out of proportion to
its value.

In any case, if pg_dump drops such comments (which I had forgotten,
but it seems true after a quick look at the code), then we could
certainly get away with having LIKE not copy them. That would fix
the immediate problem.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-12-22 20:37:23 Re: Tuplestore should remember the memory context it's created in
Previous Message Alvaro Herrera 2009-12-22 19:29:07 Re: Segfault from PL/Perl Returning vstring