Re: BUG #13126: table constraint loses its comment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: xi(at)resolvent(dot)net
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13126: table constraint loses its comment
Date: 2015-04-25 21:05:48
Message-ID: 8519.1429995948@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

xi(at)resolvent(dot)net writes:
> In some circumstances, the comment on a table constraint disappears. Here
> is an example:

Hm, yeah. The problem is that ATExecAlterColumnType() rebuilds all the
affected indexes from scratch, and it isn't doing anything about copying
their comments to the new objects (either comments on the constraints, or
comments directly on the indexes).

The least painful way to fix it might be to charter ATPostAlterTypeCleanup
to create COMMENT commands and add those to the appropriate work queue,
rather than complicating the data structure initially emitted by
ATExecAlterColumnType. But it'd still be a fair amount of new code I'm
afraid.

Not planning to fix this personally, but maybe someone else would like to
take it up.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-04-25 23:47:54 Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj
Previous Message me 2015-04-25 19:53:13 BUG #13160: Incorrect escaping of quotes in JSON export

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-04-25 21:50:09 Re: Allow SQL/plpgsql functions to accept record
Previous Message Pavel Stehule 2015-04-25 20:23:21 Re: PL/pgSQL, RAISE and error context