Re: Timeline ID hexadecimal format

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Sébastien Lardière <sebastien(at)lardiere(dot)net>, Greg Stark <stark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Timeline ID hexadecimal format
Date: 2023-03-20 08:17:27
Message-ID: a8904c44-0cb1-83d3-553b-07c2b45dd48a@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have committed the two documentation changes, with some minor adjustments.

On 07.03.23 18:14, Sébastien Lardière wrote:
>>>> Maybe this could be fixed instead?
>>>
>>> Indeed, and strtoul is probably a better option than sscanf, don't
>>> you think ?
>>
>> Yeah, the use of sscanf() is kind of weird here.  We have been moving
>> the option parsing to use option_parse_int().  Maybe hex support could
>> be added there.  Or just use strtoul().
>
>
> I've made the change with strtoul
>
> About option_parse_int(), actually, strtoint() is used, do we need a
> option_parse_ul() fonction ?

For the option parsing, I propose the attached patch. This follows the
structure of option_parse_int(), so in the future it could be extracted
and refactored in the same way, if there is more need.

Attachment Content-Type Size
v6-0001-pg_waldump-Allow-hexadecimal-values-for-t-timelin.patch text/plain 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-03-20 08:19:41 Re: logical decoding and replication of sequences, take 2
Previous Message Kyotaro Horiguchi 2023-03-20 08:05:41 About a recently-added permission-related error message