Strange code in EXPLAIN for queryid

Поиск
Список
Период
Сортировка
От David Rowley
Тема Strange code in EXPLAIN for queryid
Дата
Msg-id CAApHDvqhSLYpSU_EqUdN39w9Uvb8ogmHV7_3YhJ0S3aScGBjsg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Strange code in EXPLAIN for queryid  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
I was wondering about the following code in explain.c

char buf[MAXINT8LEN + 1];

pg_lltoa(plannedstmt->queryId, buf);
ExplainPropertyText("Query Identifier", buf, es);

I thought it was a bit strange that we don't just use
ExplainPropertyInteger() instead of going to the trouble of building
the string with pg_lltoa().

On looking a little closer I also saw that plannedstmt->queryId is a
uint64.  I guess that we're showing this as an int64 so that it
matches the queryid column in the pg_stat_statements view? If so, I
think it's worth a comment to mention why we're not using
ExplainPropertyUInteger.

Any objection to applying the attached to pg14 and master?

David

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Extra code in commit_ts.h
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Use generation context to speed up tuplesorts