Re: [PATCH] Add function to_oct
| От | Dean Rasheed |
|---|---|
| Тема | Re: [PATCH] Add function to_oct |
| Дата | |
| Msg-id | CAEZATCWaQ+-7A9AxxUcxdhdOa4p54rSvKreHMXhnTJg6VuAURQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: [PATCH] Add function to_oct (Nathan Bossart <nathandbossart@gmail.com>) |
| Ответы |
Re: [PATCH] Add function to_oct
|
| Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: