Re: pl/pgSQL, get diagnostics and big data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pl/pgSQL, get diagnostics and big data
Дата
Msg-id 17251.1457738206@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pl/pgSQL, get diagnostics and big data  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Ответы Re: pl/pgSQL, get diagnostics and big data
Список pgsql-hackers
"Andreas 'ads' Scherbaum" <adsmail@wars-nicht.de> writes:
> On 09.02.2016 20:32, Christian Ullrich wrote:
>> To fix this, I think it will be enough to change the format strings to
>> use "%zu" instead of "%lu".

> Attached is a new version of the patch, with %lu replaced by %zu.

Nonono ... that just moves the portability problem to a different set of
platforms.  "%z" means size_t, and sizeof(size_t) is not any more fixed
than sizeof(long).  The right thing to use is UINT64_FORMAT.

+                                  /* Int64GetDatum() instead of UInt64GetDatum(),
+                                     because there is no UInt64GetDatum() */
+                                  Int64GetDatum(estate->eval_processed),

Although in practice you'd get the same conversion anyway, I'm thinking
it's time to fix that omission rather than just averting our eyes.  The
use of int64 data isn't decreasing as time goes on.

These are small enough changes that there's no need for a new patch
submission.  I'll take it from here, unless I find bigger issues.
        regards, tom lane



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

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: Relation extension scalability
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Background Processes and reporting