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 1nUuOF-0005FN-0v for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Mar 2022 17:58: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 1nUuOD-0004IT-PM for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Mar 2022 17:58: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 1nUuOD-0004II-Fe for pgsql-bugs@lists.postgresql.org; Thu, 17 Mar 2022 17:58:21 +0000 Received: from mxout4.routing.net ([2a03:2900:1:a::9]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nUuO5-0002bB-Ne for pgsql-bugs@postgresql.org; Thu, 17 Mar 2022 17:58:20 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 44606100780; Thu, 17 Mar 2022 17:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1647539889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VYGspWmR6pmUC1aBJ7H+5YZJ/HQ50fB5Al7HkL3FPYU=; b=Z6s3CM2ApwWJYMce9MReA3jR3WPaUTnqKEYbBxoHNMCZD2GA4nSFCpVt3XTbCtM9y9IRFt WTgjPh1si5N3ueKf1Gc1SutEhKcfdOkurcXNxXReEOR4YRw8/LuATxX8TQnygVe//uwx0R hjOWHDwb3rPsLtvAE532tD9HzjfgOn4= Received: from remote.index.de (i68970D96.versanet.de [104.151.13.150]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id C6F37401EC; Thu, 17 Mar 2022 17:58:08 +0000 (UTC) Received: from acedia.index-gruppe.local (192.168.54.121) by invidia.index-gruppe.local (192.168.54.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 17 Mar 2022 18:58:05 +0100 Received: from acedia.index-gruppe.local ([fe80::99ae:65be:bb2b:d4af]) by acedia.index-gruppe.local ([fe80::99ae:65be:bb2b:d4af%13]) with mapi id 15.01.2308.027; Thu, 17 Mar 2022 18:58:04 +0100 From: Arne Roland To: Christophe Courtois , pgsql-bugs Subject: Re: Detaching a partition with a FK on itself is not possible Thread-Topic: Detaching a partition with a FK on itself is not possible Thread-Index: AQHYOiVYLBdbJLJ5J06/gspc+lERCazD1v7Z Date: Thu, 17 Mar 2022 17:58:04 +0000 Message-ID: <666ad9554f9d4781aa45c4613544075d@index.de> References: <06c75996-f72b-e57b-0efe-31e74a475c39@dalibo.com> In-Reply-To: <06c75996-f72b-e57b-0efe-31e74a475c39@dalibo.com> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.1.33] Content-Type: multipart/alternative; boundary="_000_666ad9554f9d4781aa45c4613544075dindexde_" MIME-Version: 1.0 X-Mail-ID: 0c2d7c56-1127-4be0-b2a2-9abe660d910c List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_666ad9554f9d4781aa45c4613544075dindexde_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I don't think this a bug, but a feature request. I therefore think hackers = would be more appropriate. I don't see how an additional syntax to modify the constraint should help. If I'd want to fix this, I'd try to teach the detach partition code about s= elf referencing foreign keys. It seems to me like that would be the cleanes= t solution, because the user doesn't need to care about this at all. I don't think, I'll spend time on this in the near future though. Regards Arne --_000_666ad9554f9d4781aa45c4613544075dindexde_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,


I don't think this a bug, but a feature request. I therefore think hacke= rs would be more appropriate.


I don't see how an additional syntax to modify the constraint should hel= p.


If I'd want to fix this, I'd try to teach the detach partition code abou= t self referencing foreign keys. It seems to me like that would be the clea= nest solution, because the user doesn't need to care about this at all.

I don't think, I'll spend time on this in the near future though.


Regards
Arne

--_000_666ad9554f9d4781aa45c4613544075dindexde_--