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 1nWFcp-0003RI-BB for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Mar 2022 10:50:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nWFcn-0001Bm-Sw for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Mar 2022 10:50:57 +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 1nWFcn-0001Bc-HE for pgsql-hackers@lists.postgresql.org; Mon, 21 Mar 2022 10:50:57 +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 1nWFci-00023G-A3 for pgsql-hackers@postgresql.org; Mon, 21 Mar 2022 10:50:56 +0000 Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 0C37B1007CB; Mon, 21 Mar 2022 10:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1647859848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X965XvhiE0OtBGFNgH8ed8nAhZNIx8glnxHvzinL3/0=; b=k8XRrCPjfpE/RSOOVghaaqwknMX5oMRO4oHk+CiOCZRsKq+T+9My8ZYzYYz+JR+hQ8JBX1 JuxlwWOfVQngxSKiN5lbUw8LPunOHWtipJO6utouiP2w+vHzl3NgyVxmaIPZtaaYnYjT0z LrF+H94bUrB4rGys8sQWHIEASIbQnDY= Received: from remote.index.de (i68970D96.versanet.de [104.151.13.150]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 966A43606FF; Mon, 21 Mar 2022 10:50:47 +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; Mon, 21 Mar 2022 11:50:47 +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; Mon, 21 Mar 2022 11:50:47 +0100 From: Arne Roland To: Jehan-Guillaume de Rorthais CC: Christophe Courtois , pgsql-hackers 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+lERCazD1v7ZgAXDBQCAABN3Ng== Date: Mon, 21 Mar 2022 10:50:46 +0000 Message-ID: <014cd4ec5c6d4e84a3d9a4a6451b722c@index.de> References: <06c75996-f72b-e57b-0efe-31e74a475c39@dalibo.com>,<20220321113634.68c09d4b@karst> In-Reply-To: <20220321113634.68c09d4b@karst> 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_014cd4ec5c6d4e84a3d9a4a6451b722cindexde_" MIME-Version: 1.0 X-Mail-ID: 9db07863-af68-4e70-9c4f-1fc62f9e740b List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_014cd4ec5c6d4e84a3d9a4a6451b722cindexde_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable From: Jehan-Guillaume de Rorthais Sent: Monday, March 21, 2022 11:36 Subject: Re: Detaching a partition with a FK on itself is not possible > I changed the list destination Thanks > Another solution could be to teach the create partition to detect a self > referencing FK and actually create a self referencing FK, not pointing to= the > partitioned table, and of course issuing a NOTICE to the client. That's what I meant. I didn't think about the NOTICE, but that's a good ide= a. Regards Arne --_000_014cd4ec5c6d4e84a3d9a4a6451b722cindexde_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>

Sent: Monday, March 21, 2= 022 11:36
Subject: Re: Detaching a partition with a FK on itself is not possib= le
 > I changed the list destination
Thanks

> Another solution could be to teach the create partition to detect a se= lf
> referencing FK and actually create a self referencing FK, not pointing= to the
> partitioned table, and of course issuing a NOTICE to the client.
That's what I meant. I didn't think about the NOTICE, but that's a good ide= a.

Regards
Arne

--_000_014cd4ec5c6d4e84a3d9a4a6451b722cindexde_--