RE: date function bug

Поиск
Список
Период
Сортировка
От Kevin Brannen
Тема RE: date function bug
Дата
Msg-id DM6PR19MB3451B74FE5D084C0B2F08612A46B0@DM6PR19MB3451.namprd19.prod.outlook.com
обсуждение исходный текст
Ответ на Re: date function bug  (Ravi Krishna <sr_krishna@aol.com>)
Ответы Re: date function bug  (Ravi Krishna <sr_krishna@aol.com>)
Список pgsql-general

From: Ravi Krishna <sr_krishna@aol.com>


> postgres=# select to_date('2018150X','YYYYMMDD');
  > to_date
------------
> 2019-03-03


> postgres=# select to_date('20181501','YYYYMMDD');
>  to_date
> ------------
  > 2019-03-03


is this a cut-n-paste mistake?

 

====================

Surprisingly (to me), no….

db=# select to_date('20181501','YYYYMMDD');

  to_date

------------

2019-03-03

(1 row)

 

Time: 0.497 ms

nms=# select version();

                                                 version

----------------------------------------------------------------------------------------------------------

PostgreSQL 9.6.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16), 64-bit

(1 row)

 

Time: 0.247 ms

db=#

 



This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.

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

Предыдущее
От: Ron
Дата:
Сообщение: Re: date function bug
Следующее
От: Tom Lane
Дата:
Сообщение: Re: date function bug