Bruce Momjian <br...@momjian.us> writes: > Uh, I think your patch missed a few things. First, you use "%zd" > (size_t) for the printf string, but calls to pgstat_get_my_queryid() in > src/backend/utils/error/elog.c used "%ld". Which is correct? I see > pgstat_get_my_queryid() as returning uint64, but I didn't think a uint64 > fits in a BIGINT SQL column.
Neither is correct. Project standard these days for printing [u]int64 is to write "%lld" or "%llu", with an explicit (long long) cast on the printf argument. regards, tom lane