| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, zhang_qiang81(at)163(dot)com |
| Subject: | Re: doc: Clarify that empty COMMENT string removes the comment |
| Date: | 2026-03-03 07:34:35 |
| Message-ID: | 7EEFEBA0-755F-40F5-8529-1610B256BFA6@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Mar 3, 2026, at 13:51, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Tue, Mar 3, 2026 at 12:17 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>
>>
>>
>>> On Mar 3, 2026, at 08:28, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>
>>> On Tue, Mar 3, 2026 at 8:42 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>>>
>>>>
>>>>
>>>>> On Feb 28, 2026, at 09:21, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>>>>>
>>>>> On Fri, Feb 27, 2026 at 5:12 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>>>>
>>>>> PFA v3.
>>>
>>> Thanks for updating the patch! LGTM
>>>
>>> One more comment: the handling of empty-string comments exists in both
>>> CreateComments() and CreateSharedComments(). For better test coverage,
>>> how about adding also the regression test to check that COMMENT with
>>> empty-string works as expected for shared objects such as roles?
>>>
>>
>> Sure. CreateSharedComments() handles database, tablespace and role, so as you suggested, I added tests for role in v4.
>>
>>> From: zhangqiang <zhang_qiang81(at)163(dot)com>
>>>
>>> Hi hackers,I have verified that using an empty string does indeed delete comments. I agree this patch content enables users to better understand how the database program handles empty strings when using the COMMENT ON command in documentation, thereby improving the user experience.I think it's a good patch.
>>>
>>
>> Thanks for your review. Sounds good.
>>
>> PFA v4:
>> * Add tests that use NULL and ‘’ to remove comments from a role object.
>
> Thanks for updating the patch! I've pushed it.
>
> Regards,
>
>
> --
> Fujii Masao
Hi Fujii-san, thank you very much for pushing.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-03-03 07:40:22 | Re: pg_dumpall --roles-only interact with other options |
| Previous Message | Chao Li | 2026-03-03 07:32:29 | Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) |