Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
Дата
Msg-id CAApHDvoKGDM=1v1HHGoq6-7mjdqgMYFKk-YSu=iimFz6N6ngDA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);  (Michael Bondarenko <work.michael.2956@gmail.com>)
Список pgsql-bugs
On Sat, 17 Feb 2024 at 01:27, Michael Bondarenko
<work.michael.2956@gmail.com> wrote:
>
> Adding another inconsistency I found in the docs to this thread
(https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT):
>
> The docs say: "source must be a value expression of type timestamp, time, or interval. (Expressions of type date are
castto timestamp and can therefore be used as well.)"
 
>
> Which implies that the following two results must be the same:
>
> tpch=# select extract(microseconds from date '1924.01.01');
> ERROR:  date units "microseconds" not supported
>
> tpch=# select extract(microseconds from (date '1924.01.01')::timestamp);
>  extract
> ---------
>        0

It looks like a2da77cdb should have updated the documentation for this.

David



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: BUG #18344: Pruning tables partitioned by bool range fails with invalid strategy
Следующее
От: David Rowley
Дата:
Сообщение: Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);