On Thu, 17 Aug 2023 at 16:26, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> Works for me. I did it that way in v7.
>
I note that there are no tests for negative inputs.
Doing a quick test, shows that this changes the current behaviour,
because all inputs are now treated as 64-bit:
HEAD:
select to_hex((-1234)::int);
to_hex
----------
fffffb2e
With patch:
select to_hex((-1234)::int);
to_hex
------------------
fffffffffffffb2e
The way that negative inputs are handled really should be documented,
or at least it should include a couple of examples.
Regards,
Dean