Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWGJX-00027R-46 for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2022 12:07:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oWGJV-0002bV-TX for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2022 12:07:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWGJV-0002b8-JP for pgsql-hackers@lists.postgresql.org; Thu, 08 Sep 2022 12:07:21 +0000 Received: from mail1.dalibo.net ([212.83.143.11] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWGJT-0005vz-9W for pgsql-hackers@postgresql.org; Thu, 08 Sep 2022 12:07:20 +0000 Received: from karst (larco.ioguix.net [78.202.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id 1B48C1F93A; Thu, 8 Sep 2022 14:07:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1662638837; bh=9+8ehyWYp6yuXITwm8fXlCHwdSvqFFxKfgVvmniPfmo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PPQHNld+0H+G/c0zQ7K3SS1hJ3MFRTiC6SrA63muRu9SOCcAURTiROciypulkyQlP S4frtMbuLxT+LwxqB5Icd/OocfaToEb3qexEOseHXK/R9RMwZyFXLwYswm9ErMQrsD SioHrKR3rGBY+caTHsKx9zh1rLasKNg6pnarrABA= Date: Thu, 8 Sep 2022 14:07:16 +0200 From: Jehan-Guillaume de Rorthais To: Alvaro Herrera Cc: pgsql-hackers Subject: Re: [BUG] wrong FK constraint name when colliding name on ATTACH Message-ID: <20220908140716.0323dedd@karst> In-Reply-To: <20220908112515.5pe5obtk4a63aiee@alvherre.pgsql> References: <20220908094026.640a0224@karst> <20220908112515.5pe5obtk4a63aiee@alvherre.pgsql> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 8 Sep 2022 13:25:15 +0200 Alvaro Herrera wrote: > On 2022-Sep-08, Jehan-Guillaume de Rorthais wrote: > > > Hi there, > > > > I believe this very small bug and its fix are really trivial and could be > > push out of the way quite quickly. It's just about a bad constraint name > > fixed by moving one assignation after the next one. This could easily be > > fixed for next round of releases. > > > > Well, I hope I'm not wrong :) > > I think you're right, so pushed, and backpatched to 12. I added the > test case to regression also. Great, thank you for the additional work on the regression test and the commit! > For 11, I adjusted the test case so that it didn't depend on an FK > pointing to a partitioned table (which is not supported there); it turns > out that the old code is not smart enough to get into the problem in the > first place. [...] > It seems fair to say that this case, with pg11, is unsupported and > people should upgrade if they want better behavior. That works for me. Thanks!