]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Improve the error message in COPY with HEADER option.
authorFujii Masao <fujii@postgresql.org>
Thu, 22 Jan 2026 01:13:07 +0000 (10:13 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 22 Jan 2026 01:13:07 +0000 (10:13 +0900)
commitf3da70a805f9a9dd2deada728649b2cfbeae9cb3
tree93a5edf1fde88cfb859060908993b234887c71d8
parent25dc4850747bb12e871af3589736463edd1d2aa6
Improve the error message in COPY with HEADER option.

The error message reported for invalid values of the HEADER option in COPY
command previously used the term "non-negative integer", which is
discouraged by the Error Message Style Guide because it is ambiguous about
whether zero is allowed.

This commit improves the error message by replacing "non-negative integer"
there with "an integer value greater than or equal to zero" to make
the accepted values explicit.

Author: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Steven Niu <niushiji@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwE86PcuPZbP=aurmW7Oo=eycF10gxjErWq4NmY-5TTX4Q@mail.gmail.com
src/backend/commands/copy.c
src/test/regress/expected/copy.out
src/test/regress/expected/copy2.out