Improve new hash partition bound check error messages
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 22 Feb 2021 07:06:45 +0000 (08:06 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 22 Feb 2021 07:06:45 +0000 (08:06 +0100)
commitefbfb642414b61db1567a7a902ace3f307d7564a
tree5cd647331edd4ccebd8513c2f59936122459a6b4
parent92942642788c9d73e4c090ee0a77603f7afbc1d7
Improve new hash partition bound check error messages

For the error message "every hash partition modulus must be a factor
of the next larger modulus", add a detail message that shows the
particular numbers and existing partition involved.  Also comment the
code more.

Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://www.postgresql.org/message-id/flat/bb9d60b4-aadb-607a-1a9d-fdc3434dddcd%40enterprisedb.com
src/backend/partitioning/partbounds.c
src/test/regress/expected/alter_table.out
src/test/regress/expected/create_table.out