Re: pgsql: to_char(): have format 'OF' only show the leading negative sign
Вложения
В списке pgsql-committers по дате отправления:
| От | Stephen Frost |
|---|---|
| Тема | Re: pgsql: to_char(): have format 'OF' only show the leading negative sign |
| Дата | |
| Msg-id | 20150429141102.GX30322@tamriel.snowman.net обсуждение исходный текст |
| Ответ на | pgsql: to_char(): have format 'OF' only show the leading negative sign (Bruce Momjian <bruce@momjian.us>) |
| Ответы |
Re: Re: pgsql: to_char(): have format 'OF' only show the
leading negative sign
Re: pgsql: to_char(): have format 'OF' only show the leading negative sign |
| Список | pgsql-committers |
Bruce,
* Bruce Momjian (bruce@momjian.us) wrote:
> to_char(): have format 'OF' only show the leading negative sign
>
> Previously both hours and minutes displayed as negative.
>
> Report by David Pozsar
This is causing the following error for me:
/home/sfrost/git/pg/dev/postgresql/src/backend/utils/adt/formatting.c: In function ‘DCH_to_char’:
/home/sfrost/git/pg/dev/postgresql/src/backend/utils/adt/formatting.c:2510:6: warning: format ‘%ld’ expects argument of
type‘long int’, but argument 3 has type ‘int’ [-Wformat=]
sprintf(s, ":%02ld", abs(tm->tm_gmtoff % SECS_PER_HOUR) / SECS_PER_MINUTE);
^
Since abs() is declared to return just an int. I don't see it anywhere
in our tree and I'm not sure how portable it actually is, but labs() is
supposedly in C89, so perhaps that should be used here instead?
Thanks!
Stephen
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера