Ranier Vilela <ranier...@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