Re: format_datum debugging function

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: format_datum debugging function
Date: 2024-08-14 09:16:01
Message-ID: fc8f0161-4ebe-4f70-8d25-be189bbf6e1f@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12.08.24 23:15, Paul Jungwirth wrote:
> On 8/12/24 04:32, Aleksander Alekseev wrote:
>>> [...] This function takes a Datum and the appropriate out function,
>>> and returns a char *. So you
>>> can do this:
>>>
>>> (gdb) call format_datum(range_out, $1)
>>> $2 = 0x59162692d938 "[1,4)"
>>>
>>> I assume a patch like this doesn't need documentation. Does it need a
>>> test? Anything else?
>>
>> I think you forgot to attach the patch. Or is it just a proposal?
>
> Sorry, patch attached here.

I don't think it's safe to call output functions at arbitrary points
from a debugger. But if you're okay with that during development, say,
then I think you could just call OidOutputFunctionCall(F_RANGE_OUT, $1)?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2024-08-14 09:23:25 Re: [bug fix] prepared transaction might be lost when max_prepared_transactions is zero on the subscriber
Previous Message Heikki Linnakangas 2024-08-14 07:46:38 Re: AIX support