public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alexander Korotkov <[email protected]>
To: Kirill Reshke <[email protected]>
Cc: Tender Wang <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Mon, 22 Dec 2025 00:02:22 +0200
Message-ID: <CAPpHfdudazH3uQimTv=4ztU4M9j04CeQAcPZMVSbD-dYwuh=6w@mail.gmail.com> (raw)
In-Reply-To: <CALdSSPgT4-epuBeVy3pF61gT1WbwoDXh9uYwqtR7PktFQVQzig@mail.gmail.com>
References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org>
	<CAPpHfdsh_jPZ6-2JtWoFeZravVQYY4cYCcnKXQW6KxEx+F5vxg@mail.gmail.com>
	<[email protected]>
	<CACJufxF1Hfx1PST7pCLrKkGcjHEn2A51znXmYwVccnt5GDORcw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CACJufxET9Qe-=zJtjGrKPr7-1QbVcP9y-vJU9CMEDfPGt_dbyg@mail.gmail.com>
	<[email protected]>
	<CACJufxEBvrtcOWyX2NMwOCvb2ZvaRGaGeiMQpUD=yxL6ncBFOg@mail.gmail.com>
	<[email protected]>
	<CAPpHfdvSBR+sbsRCAybN949tOGArQvMH2QeDXf2L=7NDMNbJfw@mail.gmail.com>
	<[email protected]>
	<CAPpHfduQwwa4ytK-dGjRGN0fTWfpWNNysYuUKrOetsyGioBMfA@mail.gmail.com>
	<[email protected]>
	<CAPpHfdvpzezTnuumpdJYge=x1TbhgAkjMGh2GHnScf5SFsf2ew@mail.gmail.com>
	<[email protected]>
	<CAPpHfdtBH5YhAiKhXPcLAE4CCRMaGKqupzx8u2RKEm2aQ_e3Xw@mail.gmail.com>
	<CA+gpmfLSELzEKEzSFXeLkRRMGkRfm2+7ewXHyW-8ZWPbWOywyg@mail.gmail.com>
	<CAPpHfdtnWkesztu4qq1m8RfuR2OYXd5tbPyaHk-3Db2szWrb=Q@mail.gmail.com>
	<CAPpHfdta0DMb3XjePJJWf1xbAndE8w2uYPaWEOFBGQ=xsDkfiQ@mail.gmail.com>
	<[email protected]>
	<CAPpHfdvt64X0F3thjC0q9vOTU-JqG2M_MJfEeA2-_=odNOA3Dg@mail.gmail.com>
	<[email protected]>
	<CAPpHfdu8wPv6hes7v95fF__N1pkPG1yS3YumKUGmS_jdF2RtrA@mail.gmail.com>
	<CAHewXNmBM+5qbrJMu60NxPn+0y-=2wXM-QVVs3xRp8NxFvDb9A@mail.gmail.com>
	<CAPpHfdvs-U0HQWnhe8e7B=K5k=c9FvvA39UcqnmNoLqbkgAfjw@mail.gmail.com>
	<CAHewXNnBNVgj91xxm29nrJUeVcZd6WvUXAvnx1abJnC7vZgxAQ@mail.gmail.com>
	<CALdSSPgT4-epuBeVy3pF61gT1WbwoDXh9uYwqtR7PktFQVQzig@mail.gmail.com>

On Sun, Dec 21, 2025 at 9:42 AM Kirill Reshke <[email protected]> wrote:
> On Sun, 21 Dec 2025, 12:14 Tender Wang, <[email protected]> wrote:
>> Alexander Korotkov <[email protected]> 于2025年12月20日周六 19:08写道:
>>> 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 exercise 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





view thread (165+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
  In-Reply-To: <CAPpHfdudazH3uQimTv=4ztU4M9j04CeQAcPZMVSbD-dYwuh=6w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox