pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: xi@resolvent.net
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13126: table constraint loses its comment
Date: Sat, 25 Apr 2015 17:05:48 -0400
Message-ID: <8519.1429995948@sss.pgh.pa.us> (raw)
In-Reply-To: <20150422154850.5198.26685@wrigleys.postgresql.org>
References: <20150422154850.5198.26685@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

xi@resolvent.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (15+ messages)  latest in thread

Message-ID: <8519.1429995948@sss.pgh.pa.us>
Permalink:  ../8519.1429995948@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8519.1429995948@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, xi@resolvent.net
  Subject: Re: BUG #13126: table constraint loses its comment
  In-Reply-To: <8519.1429995948@sss.pgh.pa.us>
  References: <20150422154850.5198.26685@wrigleys.postgresql.org> <8519.1429995948@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox