Re: [PATCH] Add function to_oct

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: [PATCH] Add function to_oct
Дата
Msg-id 20230821191528.GA443047@nathanxps13
обсуждение исходный текст
Ответ на Re: [PATCH] Add function to_oct  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: [PATCH] Add function to_oct  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On Mon, Aug 21, 2023 at 09:31:37AM +0100, Dean Rasheed wrote:
> 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.

I added some examples for negative inputs.

> 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.)

I renamed it to to_bin().

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

I reordered the functions in the docs.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }
Следующее
От: Markur Sens
Дата:
Сообщение: C function to return double precision[][]