Re: [COMMITTERS] pgsql: Fix compiler warnings on 64-bit boxes:
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [COMMITTERS] pgsql: Fix compiler warnings on 64-bit boxes: |
| Дата | |
| Msg-id | 7659.1157551006@sss.pgh.pa.us обсуждение |
| Ответы |
Re: [COMMITTERS] pgsql: Fix compiler warnings on 64-bit
|
| Список | pgsql-hackers |
Gavin Sherry <swm@linuxworld.com.au> writes:
> It might seem a minor quibble, but it seems like a more reliable approach
> might be to cast to a 64 bit type and user a 64 bit int formatter.
int64 is a real pain to use in error messages because of the
machine-dependence of the format string --- the translation machinery
doesn't work reliably if you try to do
ereport(...errmsg("trouble at offset " UINT64_FORMAT, bigintvar));
because any given translator will see only one of the several possible
source strings. You can get around this if you have to (print the
bigint into a char[n] local array and then use %s in the message),
but it's not worth it when dealing with values that can't plausibly
overflow an int. I think Teodor fixed it the right way.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера