Re: Introduce MIN/MAX aggregate functions to pg_lsn

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: Introduce MIN/MAX aggregate functions to pg_lsn
Дата
Msg-id CAFcNs+qC_Up88uvA9sS2F+KEjvMk0+oWoLRSP4gphhHwJk58zA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Introduce MIN/MAX aggregate functions to pg_lsn  (Surafel Temesgen <surafel3000@gmail.com>)
Ответы Re: Introduce MIN/MAX aggregate functions to pg_lsn  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers


On Tue, Jul 2, 2019 at 7:22 AM Surafel Temesgen <surafel3000@gmail.com> wrote:
>
> Hi,
> Here are same review comment

Thanks for your review.

> -      <entry>any numeric, string, date/time, network, or enum type,
> +      <entry>any numeric, string, date/time, network, lsn, or enum type,
>               or arrays of these types</entry>
>        <entry>same as argument type</entry>
> In the documentation it refereed as pg_lsn type rather than lsn alone

Fixed.

> +Datum
> +pg_lsn_larger(PG_FUNCTION_ARGS)
> +{
> + XLogRecPtr lsn1 = PG_GETARG_LSN(0);
> + XLogRecPtr lsn2 = PG_GETARG_LSN(1);
> + XLogRecPtr result;
> +
> + result = ((lsn1 > lsn2) ? lsn1 : lsn2);
> +
> + PG_RETURN_LSN(result);
> +}
>
> rather than using additional variable its more readable and effective to return the argument
> itself like we do in date data type and other place
>

Fixed.

New version attached.

Regards,

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Вложения

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

Предыдущее
От: Adam Berlin
Дата:
Сообщение: Re: C testing for Postgres
Следующее
От: Anthony Nowocien
Дата:
Сообщение: Re: progress report for ANALYZE