Re: abs function for interval

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: abs function for interval
Дата
Msg-id CAHE3wgjO_01xe-urxoFy65iASZ1+8G3HiBenLqFQOxcX9YyStg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: abs function for interval  (Andres Freund <andres@anarazel.de>)
Ответы Re: abs function for interval  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Em qui, 31 de out de 2019 às 23:45, Andres Freund <andres@anarazel.de> escreveu:
>
> 1) I don't think you can do the < 0 check on an elementwise basis. Your
>    code would e.g. make a hash out of abs('1 day -1 second'), by
>    inverting the second, but not the day (whereas nothing should be
>    done).
>
>    It'd probably be easiest to implement this by comparing with a 0
>    interval using inteval_lt() or interval_cmp_internal().
>
Hmm. Good idea. Let me try it.


--
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Allow CREATE OR REPLACE VIEW to rename the columns
Следующее
От: "lingce.ldm"
Дата:
Сообщение: Re: Problem with synchronous replication