Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)
Дата
Msg-id 579974.1591916042@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
Ranier Vilela <ranier.vf@gmail.com> writes:
> elog and errmsg_internal, permits use as proposed by the patch,
> does it mean that errmsg, does not allow and does not do the same job as
> snprintf?

Yes.  errmsg() strings are captured for translation.  If they contain
platform-dependent substrings, that's a problem, because only one variant
will get captured.  And INT64_FORMAT is platform-dependent.

We have of late decided that it's safe to use %lld (or %llu) to format
int64s everywhere, but you then have to cast the printf argument to
match that explicitly.  See commit 6a1cd8b92 for precedent.

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCH] Leading minus for negative time interval in ISO 8601
Следующее
От: Tom Lane
Дата:
Сообщение: exp() versus the POSIX standard