Re: pg_attribute.attname inconsistency when renaming primary key columns

2021-02-25 Thread Michael Paquier
On Wed, Feb 24, 2021 at 04:55:11PM +0900, Kyotaro Horiguchi wrote: > At Mon, 22 Feb 2021 21:42:44 +0100, "Joel Jacobson" wrote > in > > I solved my problem by using attnum::text instead of attname for > > pg_class.relkind = ‘i’ as a work-around to avoid a diff. > > For your information, note t

Re: pg_attribute.attname inconsistency when renaming primary key columns

2021-02-23 Thread Kyotaro Horiguchi
At Mon, 22 Feb 2021 21:42:44 +0100, "Joel Jacobson" wrote in > I solved my problem by using attnum::text instead of attname for > pg_class.relkind = ‘i’ as a work-around to avoid a diff. For your information, note that the attname of an index relation is not the name of the target column in th

Re: pg_attribute.attname inconsistency when renaming primary key columns

2021-02-22 Thread Joel Jacobson
I solved my problem by using attnum::text instead of attname for pg_class.relkind = ‘i’ as a work-around to avoid a diff. On Mon, Feb 22, 2021, at 18:21, Joel Jacobson wrote: > Hi, > > When renaming a column that is part of a primary key, > the primary key index's pg_attribute.attname value > is

pg_attribute.attname inconsistency when renaming primary key columns

2021-02-22 Thread Joel Jacobson
Hi, When renaming a column that is part of a primary key, the primary key index's pg_attribute.attname value isn't updated accordingly, the old value remains. This causes problems when trying to measure if the effects of a migration script caused the same end result as if installing the same vers