Re: Inconsistency between attname of index and attname of relation

From: Ronan Dunklau <ronan_dunklau(at)ultimatesoftware(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Inconsistency between attname of index and attname of relation
Date: 2019-07-05 14:58:43
Message-ID: CAA8M49rWpMuv9nOUdRPn-TPF_gBhTyU=Shbc0+nOXuuL1zGjYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for this quick answer, I'll report the bug to wal2json then.

Le ven. 5 juil. 2019 à 16:22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> a écrit :

> Ronan Dunklau <ronan_dunklau(at)ultimatesoftware(dot)com> writes:
> > I've noticed that renaming an indexed column produces inconsistencies in
> > the catalog. Namely, the attname of the attribute of the relation is
> > properly updated, whereas the attname of the attribute in the index is
> not,
> > and keeps the old value.
>
> If memory serves, we used to try to rename index columns, and gave up
> on that because it caused problems of its own. That's (one reason) why
> modern versions of psql show a "definition" column in \d of an index.
>
> > I think this could be considered a bug in Postgres.
>
> It is not.
>
> > If it isn't, what
> > should be the proper way to retrieve this information ?
>
> psql uses pg_get_indexdef(), looks like.
>
> regards, tom lane
>

--

This e-mail message and any attachments to it are intended only for the
named recipients and may contain legally privileged and/or confidential
information. If you are not one of the intended recipients, do not
duplicate or forward this e-mail message.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-07-05 15:06:12 Re: mcv compiler warning
Previous Message Antonin Houska 2019-07-05 14:41:34 Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3