Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uzcV7-005Yzf-3a for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Sep 2025 14:54:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uzcV5-007wE4-Px for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Sep 2025 14:54:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uzcV5-007wDv-CE for pgsql-hackers@lists.postgresql.org; Fri, 19 Sep 2025 14:54:15 +0000 Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uzcV3-001Hla-0V for pgsql-hackers@lists.postgresql.org; Fri, 19 Sep 2025 14:54:14 +0000 Received: by mail-ua1-x933.google.com with SMTP id a1e0cc1a2514c-890190da557so489821241.3 for ; Fri, 19 Sep 2025 07:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758293652; x=1758898452; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LAP9MK8BAaJd1pUdSPcefAtCX59eSZN6N/hQ0KYJHBg=; b=jFOTOHBMmI4tDITf23mEjoPg5ujPOhKiZ8DhYpuwP0RSOPeOvyGmW1aqoSvyuk/dnv S5sQiK90w8h2xgMWkFDSkrJVw8OXi6eJDSzbTK/gYUx8+7zUB1mm4Dnh0cHiQHXsJeDj HSym6L/PJVLst+9ZrUM2nrACRqakOfeEjFaot4t4ziAeTo7oGN2iRhA9c+pzL4I4RtVE ij9cCwKzlNzwAvTIqkW27ESl4Rxghu0gX3OuYYYMVERH0S9nRC//poZ/pgkteSU7RJgC O/rvGQDlta7WRaPqF72ysubypddjg4ETSTOpMy0Rzlko0+bPHXltipUoM2mmUO9Dvrdb ffdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758293652; x=1758898452; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LAP9MK8BAaJd1pUdSPcefAtCX59eSZN6N/hQ0KYJHBg=; b=sskyIINeC2uxpJgIUEP9zZYkP00UveBJXihEWUM9SaWGn+2nzyG5GtThHFqNGDKXvX 3gU/xgAri3JJW23F90MGvJlyISEb5wYN+FKXWedKIUrSFUEaXI4bB0Q7CXw2Rhceytmg Y5qGGrBbAP3c16CeS5GrBu3Y2n0aMV9GYpLOo0bNt9mQiq4YjMsuiBrROEaER188LckP jUMv8CYC2Vq9Xna0ufUbqdX4FfTX298zibqm/TYIw/cl42eARZ8leRRHoppA0R8AWPU1 wWDNCxffsbF/+vBpexBbM9bmQyOaFdlNDLqPoBg5uavHVGxA8EOVM5+3WOlwwyer9vOc xMlQ== X-Forwarded-Encrypted: i=1; AJvYcCWSQ+xfIttNaRf3ckgL/wxxDDeQqA7NxH7vKMjPDOtzASJ7Aq0Cgz3owV9po/yNyZ5qyBJPRgkWkqFTt85a@lists.postgresql.org X-Gm-Message-State: AOJu0YzIqx0jOBNf+Nn+itck0EhKK5fE5aJ8XDkgCJqTkmhy+jQpS8oW EpyU+eZ1zm6boTxpWi7Xt1uXp3WAuFoXasKDh3AHXLmowRfDTAr7PwPnalPve8eCHXt2AbpffXc 3wYwiLayI8rnX/aeM6oqqaESJCtog1fc= X-Gm-Gg: ASbGnctCIBlazR21ZwsRDdRgL/+oLaAC5Zn9JRRYajiBIjgQlh7+VvpAXZeNq+hhVZu rPIZKR3HJP4W6IaonQGCPUGmcfBH1z45X62JcQhDwKB4+G/kvzj9aTS2KNH7SpypKrrwVhsjZJR skkxDWXeOD+E/dep6eqHZQbMnaMeZl9upJRCjs3ymb9PRNos2dJ8ykWHHb/03pUwpgaBg2OCw1s UaVzS80WjEhOMu77OxEBioISuRFHQ2HeEZH3vr/ZLrB4oQ0CG1lOPzu7kurUqRiu3iPAYBSRQbg G8ylUcg= X-Google-Smtp-Source: AGHT+IFWC/LOelpDK9QTWlKMrOaKnZeMpL0hWv0//ksHUpge82/Noa1LKtXP8LAZoz0899VAGpVR76nx4OybnXpl5jU= X-Received: by 2002:a05:6102:162a:b0:525:f902:10fe with SMTP id ada2fe7eead31-588e76221b8mr1166315137.17.1758293652149; Fri, 19 Sep 2025 07:54:12 -0700 (PDT) MIME-Version: 1.0 References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org> <2643645f-2a02-43de-9321-c995ab1b7ef8@postgrespro.ru> <57a94d8a-d7b6-4c5e-9001-be1cd403b172@postgrespro.ru> <54414932-9E82-47AA-902B-2DED18F07F64@gmail.com> In-Reply-To: From: jian he Date: Fri, 19 Sep 2025 22:53:35 +0800 X-Gm-Features: AS18NWCHfUKPvHNzAtBjNJXAEB_62iSrJWAFUCeFb_vevJlAS0fqjBSbijOoaGQ Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Dmitry Koval Cc: Chao Li , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk hi. about v59. check_partitions_not_overlap_list overlap =3D list_intersection(sps1->bound->listdatums, sps2->bound->listdatums); if (list_length(overlap) > 0) { Const *val =3D (Const *) lfirst(list_head(overlap)); ereport(ERROR, errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("new partition \"%s\" would overlap with another new partition \"%s\"", sps1->name->relname, sps2->name->relname), parser_errposition(pstate, exprLocation((Node *) va= l))); } list_intersection seems not right, how can we be sure it deals with collation correctly? It failed to deal with numeric special value (0.0). demo: CREATE TABLE t (a numeric) PARTITION BY LIST (a); CREATE TABLE t1 PARTITION OF t FOR VALUES in ('0', '1'); ALTER TABLE t SPLIT PARTITION t1 INTO (PARTITION x FOR VALUES in ('0'), PARTITION x1 FOR VALUES IN ('0.0', '1')); I=E2=80=99ll think about the solution later; for now, I just wanted to poin= t out this problem.