Re: [PATCH] Fix escaping for '\' and '"' in pageinspect for gist

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Roman Khapov <rkhapov(at)yandex-team(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Fix escaping for '\' and '"' in pageinspect for gist
Date: 2025-12-29 23:31:53
Message-ID: aVMPaafLzvJV8CWw@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 30, 2025 at 12:29:49AM +0500, Kirill Reshke wrote:
> Yes, split out a function that does quoting after
> OidOutputFunctionCall. that is, this:
>
> https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/rowtypes.c#L437-L464

FWIW, refactoring that into a single function is something I have
considered while working on e7bff46e50b8, as something that could be
done on HEAD. At the end, I could not get excited with the result I
got (see the end of the thread) for the amount of lines saved, also
because this impacts a limited area of the code with what seems like a
reduction in readability.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haibo Yan 2025-12-29 23:33:53 Re: pg_plan_advice
Previous Message Chao Li 2025-12-29 23:26:43 Re: lsyscache: free IndexAmRoutine objects returned by GetIndexAmRoutineByAmId()