Re: Question -- why is there no errhint_internal function?

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Question -- why is there no errhint_internal function?
Date: 2025-04-02 22:58:30
Message-ID: CAHut+PsGmkBcFwNMc7iBcAET596WTU0aZ=YH0zWjFpUYhB58hA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(I added Andres to this thread)

Hi Andres,

I saw that a new errhint_internal() function was recently committed
[1]. I had also posted above asking about this same missing function a
month ago [2].

But, your patch only added the new function -- it does not make any
use of it for existing code that was using the errhint("%s", str)
method.

I wondered, given your commit message "but that's not exactly pretty
and makes it harder to avoid memory leaks", if you think it is
worthwhile to revisit those existing "%s" usages and modify them to
use the new errhint_internal? Tom above [3] seemed not keen to modify
those without performance reasons, although at that time
errhint_internal didn't even exist.

======
[1] https://github.com/postgres/postgres/commit/4244cf68769773ba30b868354f1f2fe93238e98b
[2] https://www.postgresql.org/message-id/CAHut%2BPtDHRif49G%2BbzspOGspETym5oKseD13v0tcBJXWUrTx9A%40mail.gmail.com
[3] https://www.postgresql.org/message-id/547688.1738630459%40sss.pgh.pa.us

Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2025-04-02 23:15:33 Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Previous Message David Rowley 2025-04-02 22:26:08 Re: BTScanOpaqueData size slows down tests