Re: [PATCH] Add function to_oct

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: [PATCH] Add function to_oct
Дата
Msg-id CAEZATCXzaF5sVx+m=C6uYT45NChYhgiqp80Jqi4CBLK15b0z5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add function to_oct  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: [PATCH] Add function to_oct  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Sun, 20 Aug 2023 at 16:25, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Sat, Aug 19, 2023 at 08:35:46AM +0100, Dean Rasheed wrote:
>
> > The way that negative inputs are handled really should be documented,
> > or at least it should include a couple of examples.
>
> I used your suggestion and noted that the output is the two's complement
> representation [0].
>

Hmm, I think just including the doc text update, without the examples
of positive and negative inputs, might not be sufficient to make the
meaning clear to everyone.

Something else that bothers me slightly is the function naming --
"hexadecimal" gets abbreviated to "hex", "octal" gets abbreviated to
"oct", but "binary" is left as-is. I think it ought to be "to_bin()"
on consistency grounds, even though I understand the words "to bin"
could be interpreted differently. (Looking elsewhere for precedents,
Python has bin(), oct() and hex() functions.)

Also, I think the convention is to always list functions
alphabetically, so to_oct() should really come after to_hex().

Regards,
Dean



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: pg_upgrade - typo in verbose log
Следующее
От: "Andrey M. Borodin"
Дата:
Сообщение: Re: UUID v7