Re: Created feature for to_date() conversion using patterns'YYYY-WW', 'YYYY-WW-D', 'YYYY-MM-W' and 'YYYY-MM-W-D'
От | Cleysson Lima |
---|---|
Тема | Re: Created feature for to_date() conversion using patterns'YYYY-WW', 'YYYY-WW-D', 'YYYY-MM-W' and 'YYYY-MM-W-D' |
Дата | |
Msg-id | CAEPXaE1n3g2hc4yfsM2VdmUg+LL_KL37e-WF4oYqUk8fG0zhjg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Created feature for to_date() conversion using patterns'YYYY-WW', 'YYYY-WW-D', 'YYYY-MM-W' and 'YYYY-MM-W-D' (Mark Lorenz <postgres@four-two.de>) |
Ответы |
Re: Created feature for to_date() conversion using patterns 'YYYY-WW', 'YYYY-WW-D', 'YYYY-MM-W' and 'YYYY-MM-W-D'
|
Список | pgsql-hackers |
Em sex., 10 de jan. de 2020 às 09:22, Mark Lorenz <postgres@four-two.de> escreveu:
Updated the chg_to_date_yyyywwd.patch with additional tests (because it
works not only for 'D' pattern but also for all day patterns like 'Day'
or 'DY'). Added the necessary documentation change.
(The fix_to_char_yyyywwd.patch from
f4e740a8de3ad1e762a28f6ff253ea4f%40four-two.de is still up-to-date)
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: tested, passed
Documentation: not tested
Hi Mark,
this is a review of the patch: chg_to_date_yyyywwd.patch
There hasn't been any problem, at least that I've been able to find.
This one applies cleanly.
The entire compilation went without error as well.
############# Without patch #############
postgres=# SELECT to_date('2019-1-1', 'YYYY-WW-D');
to_date
------------
2019-01-01
(1 row)
postgres=# SELECT to_date('2019-1-2', 'YYYY-WW-D');
to_date
------------
2019-01-01
(1 row)
postgres=# SELECT to_date('2019-1-9', 'YYYY-WW-D');
to_date
------------
2019-01-01
(1 row)
############# With patch #############
postgres=# SELECT to_date('2019-1-1', 'YYYY-WW-D');
to_date
------------
2018-12-30
(1 row)
postgres=# SELECT to_date('2019-1-2', 'YYYY-WW-D');
to_date
------------
2018-12-31
(1 row)
postgres=# SELECT to_date('2019-1-9', 'YYYY-WW-D');
to_date
------------
2019-01-07
(1 row)
+1 for committer review
--
Cleysson Lima
В списке pgsql-hackers по дате отправления: