Re: BUG #17409: Unable to alter data type of clustered column which is referenced by foreign key
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Japin Li <japinli@hotmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, holly.roberts@starlingbank.com,
peter@eisentraut.org, pgsql-bugs@lists.postgresql.org
Date: 2022-03-11T00:37:45Z
Lists: pgsql-bugs
Attachments
- v3-fix-alter-data-type-of-clustered-column.patch (text/x-diff) patch v3
Japin Li <japinli@hotmail.com> writes: > Attach a new patch to fix the replica identify case, also add test cases. Now that we realize we need to de-duplicate, it seems to me we should postpone the get_rel_name() calls so that we don't have to do that work repeatedly; as attached. Also, while I've not done anything about it here, the proposed test cases seem remarkably cavalier about their choices of test table names. If you want to use names as generic as "parent" and "child", they'd better be temp tables to avoid risk of conflict against other concurrent regression tests. But most of alter_table.sql prefers to use names starting with "at". regards, tom lane
Commits
-
Restore the previous semantics of get_constraint_index().
- 641f3dffcdf1 15.0 landed
- 8dcd1c3564f0 14.3 landed
-
Change get_constraint_index() to use pg_constraint.conindid
- 8b069ef5dca9 14.0 cited