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

Поиск
Список
Период
Сортировка
От jian he
Тема Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
Дата
Msg-id CACJufxGFuZsj+31a204fFpxv_RCHA-u1h6WEBZ6qpjBVoio5dQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
Список pgsql-bugs
On Wed, May 8, 2024 at 5:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Here's a more fleshed-out patch.  I don't think we really need to
> document the behavior for negative intervals; at least, we haven't
> done that so far for any other fields.  I did add testing of such
> cases though.
>

the doc looks good to me.
extract quarter from the interval makes sense to me.

but in real life, for week, we generally begin with 1?
like "the first week", "second week"

so should
select extract(week from interval '1 day');
return 1
?



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

Предыдущее
От: "Wetmore, Matthew (CTR)"
Дата:
Сообщение: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
Следующее
От: Chris Travers
Дата:
Сообщение: pg_rewind fails on Windows where tablespaces are used