date_part/extract parse curiosity

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема date_part/extract parse curiosity
Дата
Msg-id 1d5ff26f-f122-169b-eeff-abbaced85838@xs4all.nl
обсуждение исходный текст
Ответы Re: date_part/extract parse curiosity  (Japin Li <japinli@hotmail.com>)
Список pgsql-hackers
Hi,

I noticed that
   select date_part('millennium', now()); --> 3

will execute also, unperturbed, in this form:
   select date_part('millennium xxxxx', now()); --> 3

By the same token

   select extract(millennium from now()) --> 3
   select extract(millenniumxxxxxxxxx from now()) --> 3

This laxness occurs in all releases, and with 'millennium', 
'millisecond', and 'microsecond' (at least).

Even though it's not likely to cause much real-life headaches, and I 
hesitate to call it a real bug, perhaps it would be better if it could 
be a bit stricter.

Thanks,

Erik Rijkers



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

Предыдущее
От: Ants Aasma
Дата:
Сообщение: Re: Standby recovers records from wrong timeline
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Logical WAL sender unresponsive during decoding commit