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.96) (envelope-from ) id 1vXRVj-00APc0-0i for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Dec 2025 22:02:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vXRVg-00CQp7-3A for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Dec 2025 22:02:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vXRVg-00CQoy-20 for pgsql-hackers@lists.postgresql.org; Sun, 21 Dec 2025 22:02:41 +0000 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vXRVe-001y0M-1s for pgsql-hackers@lists.postgresql.org; Sun, 21 Dec 2025 22:02:40 +0000 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-65d0953cd49so2135141eaf.0 for ; Sun, 21 Dec 2025 14:02:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766354555; x=1766959355; 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=WhmAPNA603+344p2eiLufyLVc8+QB1XkOGwU2i/xHng=; b=apXc67WNLTnhn6RwpCYkhBWCqGqBLlRgAHcphjq2bej7evUJM8c3xxDL4ZYGC1ulGW kXrGW4l6OnbXeUyJbNUdxYcH8zi52RErCn8xs/PecErcerR58vXWu4Yp+gYtFJ4mDk4/ IbsxTqH04UepMZmAaecyAK0GDcw1W2flsq3TZegO5TdkJWGVPO2Mq1ib6Cs98ojCsu6S 2nmwxT/by6N4J7Ko8g7FUiLRROyKOFoPyrxQIGAsg5iSGJy11VDAt355kh7tlZJMN0hy dFdh941CxFavvhBpdcWR50nK4nDP9qHBehpEi0MULCVAsmMHBYnwGI08yCJmkDYzKI+l NOGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766354555; x=1766959355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WhmAPNA603+344p2eiLufyLVc8+QB1XkOGwU2i/xHng=; b=FWwJtMKogr7wmcWCVgVrU/tEPNJBjUMXz8GUK0akwhoYSbIxCrxFGtDfGeB38Px5yv pf+0sB4qY+R5CrxMyDP01bJftgBnO6ubMQr/6K8Pxs8d/j4OCqBcmbObKi0CmL/qby9r WIRn+PGzrMqeMawPufhKVkPaAyXocgftncMWFpPDv9hH7OzmFwSSRTZIPWfUyblH08Pf +qRF3ulZc1Pu0bfqGdW+sYimezXFMgKBCbU69MlZpXflyAIkvNJobhq/UxIEMPrTsVJ3 D8kTQvl+lgsl7NXXJVfDktCFL620xEyYaOGqfBt7kxqiRqGbvFlMJucUeQfB3yGr7k4b V8DA== X-Forwarded-Encrypted: i=1; AJvYcCX1aLEIs7NJACA6wu+u7/c/2aMWKQNEpFCH7Zwb4RbSHVRorEAWUr+RAqcoq6mSONJIU24WP4FSg/w4CRo9@lists.postgresql.org X-Gm-Message-State: AOJu0Yxf3nm/Oyh1c2BQKjKMSt8o90usYVAIERfhSExNplX5ExlblKuz CDEP7JOP6Okt0lTxV1irNe1fWXl62bN748snhwoiD9mnwpMpCfjKyWs6wbaE5rmO/cPeCCwxgIN wBCjg9KwgEtCDxAK5xBdJZt8TYvpoBXE= X-Gm-Gg: AY/fxX5aJwXG+WYAEA9Y9TQ8TkV42Opa8QvPqaTKdCzDfwbrtwzLTlTqbulVPkJKgQo 9LFyXY0aPlx5Jz7BGGYGbDpMisj5acoPcJZE6owvbEG5/R3Wvij7JBSLhek6jS1UDPSO0VGg8h/ VHk8FW8LTsrgTIGmvOgWg9ygvafK7bHy/Zru9c1Eh2L9F6gSD+nIpjKJPVSiMFN7/ol/ySQx4Ke gRDNs6zfY6NKm6MBttNS0dXiV/EMk/sZN+VbZur/gfTYQnPiPYLf4waPEwQEDNcf9kZ4GP5aadv Gepe9WzLALDT7R8tpUfMBQYfXhzjVhEuaVVnMTmXruu6nymLCX95qUmIuF9pQnwZEeWOP6Nn17S 82+5AhSNSy6No5eFTxKr2A49/QP8= X-Google-Smtp-Source: AGHT+IEQ2F0CiKc/QELF22kBJNV5wGs42JjENjyqp8yQHLJ6/r7Z1OEveMzVMG2yusLDR3vuHIzV3CYnTWd5SoP2+JM= X-Received: by 2002:a05:6820:2223:b0:65d:99e:6533 with SMTP id 006d021491bc7-65d0eb2fc33mr3788250eaf.82.1766354555383; Sun, 21 Dec 2025 14:02:35 -0800 (PST) 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> <3280c458-a886-4c58-8e2b-4d220b73161d@postgrespro.ru> <09414bf8-9326-431c-9422-b13bddf5f554@postgrespro.ru> <29ff27f5-d359-4479-b11c-ce28e525d806@postgrespro.ru> In-Reply-To: From: Alexander Korotkov Date: Mon, 22 Dec 2025 00:02:22 +0200 X-Gm-Features: AQt7F2rlrjppAoWUXcMdwa8aWkb317d_zDwyD_ytlUg4OPbIjN1LlZZyVedpY64 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Kirill Reshke Cc: Tender Wang , PostgreSQL Hackers 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 On Sun, Dec 21, 2025 at 9:42=E2=80=AFAM Kirill Reshke wrote: > On Sun, 21 Dec 2025, 12:14 Tender Wang, wrote: >> Alexander Korotkov =E4=BA=8E2025=E5=B9=B412=E6=9C= =8820=E6=97=A5=E5=91=A8=E5=85=AD 19:08=E5=86=99=E9=81=93=EF=BC=9A >>> I agree with you that ERRCODE_UNDEFINED_TABLE is certainly wrong error >>> code because the table actually exists. ERRCODE_WRONG_OBJECT_TYPE is >>> better. For example, we throw it when trying to attach a partition to >>> non-partitioned table. So, the parent table type is wrong. However, >>> are objects in the situation under consideration really have wrong >>> type? The problem is that one table is not partition of another. >>> However, it's possibly that they could be attached without changing of >>> their types. So, I think about >>> ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE. What do you think? >> >> >> It's ok for me. Please check the v2 patch. > > > Hi! Your v2 looks fine > The only question for me is, should we add any regression test to exercis= e this code, or it is not worth the troubles? I've checked contents of out regression tests. I see we very rarely include SQLSTATE there, mostly in psql and plpgsql tests. Thus, I think we should just fix the SQLSTATE without dedicating a test for that. So, I'm going to push the patch from Tender Wang if no objections. ------ Regards, Alexander Korotkov Supabase