]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix SPLIT PARTITION hint for DEFAULT partition bounds
authorAlexander Korotkov <akorotkov@postgresql.org>
Tue, 19 May 2026 10:39:39 +0000 (13:39 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Tue, 19 May 2026 10:54:55 +0000 (13:54 +0300)
commit971017c49599b6666029ca46ee00378d8836f336
tree7481ebff7117caaaa91b67492ae6ce8a5795e3a7
parent9354896920e4b2efd3b1b88caaea4e0c9071acb2
Fix SPLIT PARTITION hint for DEFAULT partition bounds

When ALTER TABLE ... SPLIT PARTITION specifies a DEFAULT partition, the
explicit partitions do not need to cover the split partition's bound
exactly.  They may cover only part of it, with the DEFAULT partition
covering the remaining range.

However, the existing hint said that the combined bounds of the new
partitions must exactly match the bound of the split partition, which is
misleading for this case and inconsistent with the code comment.

Fix the hint to state the actual requirement: explicit partition bounds
must stay within the bounds of the split partition when a DEFAULT
partition is specified.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/C18878AB-DEB2-4A61-9995-A035DD644B81@gmail.com
src/backend/partitioning/partbounds.c
src/test/regress/expected/partition_split.out