| От | Peter Eisentraut |
|---|---|
| Тема | interval precision oddness |
| Дата | |
| Msg-id | 1310509337.17676.9.camel@vanquo.pezone.net обсуждение |
| Ответы |
Re: interval precision oddness
|
| Список | pgsql-hackers |
When you create a column with a plain "interval" column, the typmod is set to -1 and the information schema reports this as 6, because that's what the internal default value is (see _pg_datetime_precision function). But when you create a column such as "interval year to month"), the typmod is actually the bit encoding of "year to month" in the higher 16 bits and 65535 in the lower 16 bits, and so the information schema reports the precision as 65535, whereas the actual behavior still corresponds to a precision of 6. I guess this could be seen as a reporting issue. We could adjust _pg_datetime_precision to map 65535 to 6, just like -1 is mapped to 6. Or is there anything else wrong here?
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера