]> git.ipfire.org Git - thirdparty/postgresql.git/commit
doc: Clarify that empty COMMENT string removes the comment.
authorFujii Masao <fujii@postgresql.org>
Tue, 3 Mar 2026 05:47:10 +0000 (14:47 +0900)
committerFujii Masao <fujii@postgresql.org>
Tue, 3 Mar 2026 05:47:10 +0000 (14:47 +0900)
commit4574dd44da3c0a922ebd7117ee5229dbe3f2c84f
treebd1f550dff53ee55a306ab68de0c19a54f3a0f92
parent8fc45ac5d91a0834f6bca1405309749e6ec687dd
doc: Clarify that empty COMMENT string removes the comment.

Clarify the documentation of COMMENT ON to state that specifying an empty
string is treated as NULL, meaning that the comment is removed.

This makes the behavior explicit and avoids possible confusion about how
empty strings are handled.

Also adds regress test cases that use empty string to remove a comment.

Backpatch to all supported versions.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Reviewed-by: Shengbin Zhao <zshengbin91@gmail.com>
Reviewed-by: Jim Jones <jim.jones@uni-muenster.de>
Reviewed-by: zhangqiang <zhang_qiang81@163.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/26476097-B1C1-4BA8-AA92-0AD0B8EC7190@gmail.com
Backpatch-through: 14
doc/src/sgml/ref/comment.sgml
src/test/regress/expected/create_index.out
src/test/regress/expected/create_role.out
src/test/regress/sql/create_index.sql
src/test/regress/sql/create_role.sql