Обсуждение: [PATCH] Add min/max aggregate functions to BYTEA

Поиск
Список
Период
Сортировка

[PATCH] Add min/max aggregate functions to BYTEA

От
Marat Buharov
Дата:
Hello. BYTEA type has the ability to use comparison operations. But it
is absent of min/max aggregate functions. They are nice to have to
provide consistency with the TEXT type.


--

With best regards,
Marat Bukharov

Вложения

Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Marat Buharov
Дата:
V2 patch with fixed tests

--

With best regards,
Marat Bukharov

ср, 3 июл. 2024 г. в 16:03, Marat Buharov <marat.buharov@gmail.com>:
>
> Hello. BYTEA type has the ability to use comparison operations. But it
> is absent of min/max aggregate functions. They are nice to have to
> provide consistency with the TEXT type.
>
>
> --
>
> With best regards,
> Marat Bukharov

Вложения

Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Marat Bukharov
Дата:
V3 patch with fixed length comparison

--

With best regards,
Marat Bukharov

>
> V2 patch with fixed tests
>
> >
> > Hello. BYTEA type has the ability to use comparison operations. But it
> > is absent of min/max aggregate functions. They are nice to have to
> > provide consistency with the TEXT type.
> >



Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Marat Bukharov
Дата:
V3 patch with fixed length comparison


--

With best regards,
Marat Bukharov

>
> V2 patch with fixed tests
>
> >
> > Hello. BYTEA type has the ability to use comparison operations. But it
> > is absent of min/max aggregate functions. They are nice to have to
> > provide consistency with the TEXT type.
> >

Вложения

Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Marat Bukharov
Дата:
V4 path with fixed usage PG_GETARG_BYTEA_PP instead of PG_GETARG_TEXT_PP

--

With best regards,
Marat Bukharov

>
> V3 patch with fixed length comparison
>
> >
> > V2 patch with fixed tests
> >
> > >
> > > Hello. BYTEA type has the ability to use comparison operations. But it
> > > is absent of min/max aggregate functions. They are nice to have to
> > > provide consistency with the TEXT type.
> > >

Вложения

Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Aleksander Alekseev
Дата:
Hi Marat,

> V4 path with fixed usage PG_GETARG_BYTEA_PP instead of PG_GETARG_TEXT_PP

Thanks for the patch.

Please add it to the nearest open commitfest [1].

```
+select min(v) from bytea_test_table;
+ min
+------
+ \xaa
+(1 row)
+
+select max(v) from bytea_test_table;
+ max
+------
+ \xff
+(1 row)
```

If I understand correctly, all the v's are of the same size. If this
is the case you should add more test cases.

[1]: https://commitfest.postgresql.org/

-- 
Best regards,
Aleksander Alekseev



Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Marat Bukharov
Дата:
What part of commitfest should I put the current patch to: "SQL
Commands", "Miscellaneous" or something else? I can't figure it out.

--

With best regards,
Marat Bukharov

> Hi Marat,
>
> > V4 path with fixed usage PG_GETARG_BYTEA_PP instead of PG_GETARG_TEXT_PP
>
> Thanks for the patch.
>
> Please add it to the nearest open commitfest [1].
>
> ```
> +select min(v) from bytea_test_table;
> + min
> +------
> + \xaa
> +(1 row)
> +
> +select max(v) from bytea_test_table;
> + max
> +------
> + \xff
> +(1 row)
> ```
>
> If I understand correctly, all the v's are of the same size. If this
> is the case you should add more test cases.
>
> [1]: https://commitfest.postgresql.org/
>
> --
> Best regards,
> Aleksander Alekseev



Re: [PATCH] Add min/max aggregate functions to BYTEA

От
Aleksander Alekseev
Дата:
Hi,

> What part of commitfest should I put the current patch to: "SQL
> Commands", "Miscellaneous" or something else? I can't figure it out.

Personally I qualified a similar patch [1] as "Server Features",
although I'm not 100% sure if this was the best choice.

[1]: https://commitfest.postgresql.org/48/4905/

-- 
Best regards,
Aleksander Alekseev