Re: Type scale returned by PQfmod() 65531 for time/timestamp output parameter?
В списке pgsql-interfaces по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Type scale returned by PQfmod() 65531 for time/timestamp output parameter? |
| Дата | |
| Msg-id | 7537.1518711940@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Type scale returned by PQfmod() 65531 for time/timestamp outputparameter? (Sebastien FLAESCH <sf@4js.com>) |
| Ответы |
Re: Type scale returned by PQfmod() 65531 for time/timestamp outputparameter?
|
| Список | pgsql-interfaces |
Sebastien FLAESCH <sf@4js.com> writes:
> When using a stored function returning output parameters defined with as time[(n)]
> or timestamp[(n)], PQfmod() always returns the same SCALE (65531/0xFFFB), no matter
> what time/timestamp precision is used.
Your misunderstanding is in assuming that typmod decoration on function
parameters means anything. It doesn't; the function is effectively just
declared as taking or returning plain time or timestamp.
Perhaps someday that will change, but it'd be a big task with a lot of
hard decisions to make. For instance, do we allow creation of both
f(time(2)) and f(time(4)), and if so what's the rule for choosing which
one to call?
regards, tom lane
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера