minor error message enhancement in refuseDupeIndexAttach

Lists: pgsql-hackers
From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: minor error message enhancement in refuseDupeIndexAttach
Date: 2025-04-15 08:52:00
Message-ID: CACJufxGBfykJ_1ztk9T+L_gLmkOSOF+mL9Mn4ZPydz-rh=LccQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

hi.

minor error message enhancement

in refuseDupeIndexAttach, we can change from

errdetail("Another index is already attached for partition \"%s\"."...)

to

errdetail("Another index \"%s\" is already attached for partition \"%s\".")

So we can easily understand which index is already attached for
partition \"%s\".

Attachment Content-Type Size
v1-0001-minor-error-message-enhancement.patch text/x-patch 2.1 KB

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: minor error message enhancement in refuseDupeIndexAttach
Date: 2025-04-15 09:02:19
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

> On 15 Apr 2025, at 10:52, jian he <jian(dot)universality(at)gmail(dot)com> wrote:

> in refuseDupeIndexAttach, we can change from
>
> errdetail("Another index is already attached for partition \"%s\"."...)
>
> to
>
> errdetail("Another index \"%s\" is already attached for partition \"%s\".")
>
> So we can easily understand which index is already attached for
> partition \"%s\".

That seems like it could be handy. As this relates to chaning old and existing
behavior, and we are in feature freeze, I suggest registering this in the
commitfest app.

--
Daniel Gustafsson