Re: How to reformat output of "age()" function

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: How to reformat output of "age()" function
Дата
Msg-id CA+bJJbxWNYGfdaE4qB_WKgHoPeewmQyfLXzhF9Nhhys4j0OqOw@mail.gmail.com
обсуждение исходный текст
Ответ на How to reformat output of "age()" function  (David Gauthier <davegauthierpg@gmail.com>)
Список pgsql-general
OOps, I got it bad:

On Thu, Sep 12, 2019 at 1:50 PM Francisco Olarte <folarte@peoplecall.com> wrote:

> timestamp / interval arithmetic is really a hairy thing. ( As shown
> below, start point carefully taken to avoid crossing dsts )

It was chosen to FORCE, not AVOID, crossing dst.

> cdrs=# select x, '2019.11.20 20:00:00'::timestamptz + x::interval as
> sum from ( values ('5 mons 10 days 10:00:00'),('163 days
> 11:00:00'),('3923:00:00')) as v(x);
>             x            |          sum
> -------------------------+------------------------
>  5 mons 10 days 10:00:00 | 2020-05-01 06:00:00+02
>  163 days 11:00:00       | 2020-05-02 07:00:00+02
>  3923:00:00              | 2020-05-02 08:00:00+02
> (3 rows)

cdrs=# select x, '2019.11.20 20:00:00'::timestamptz + x::interval as
sum from ( values ('0'),('5 mons 10 days 10:00:00'),('163 days
11:00:00'),('3923:00:00')) as v(x);
            x            |          sum
-------------------------+------------------------
 0                       | 2019-11-20 20:00:00+01
 5 mons 10 days 10:00:00 | 2020-05-01 06:00:00+02
 163 days 11:00:00       | 2020-05-02 07:00:00+02
 3923:00:00              | 2020-05-02 08:00:00+02
(4 rows)

Subject is just complex enough I should avoid making this typos!

Apologies, my fault, bad proof reading, hungry....

Francisco Olarte.



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

Предыдущее
От: Francisco Olarte
Дата:
Сообщение: Re: How to reformat output of "age()" function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: update returning order by syntax error question