Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4a3d806

Browse files
committed
Use ExplainPropertyInteger for queryid in EXPLAIN
This saves a few lines of code. Also add a comment to mention why we useExplainPropertyInteger instead of ExplainPropertyUInteger given thatqueryid is a uint64 type.Author: David RowleyReviewed-by: Julien RouhaudDiscussion:https://postgr.es/m/CAApHDvqhSLYpSU_EqUdN39w9Uvb8ogmHV7_3YhJ0S3aScGBjsg@mail.gmail.comBackpatch-through: 14, where this code was originally added
1 parentc9229d3 commit4a3d806

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/commands/explain.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,12 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es,
606606

607607
if (es->verbose&&plannedstmt->queryId!=UINT64CONST(0))
608608
{
609-
charbuf[MAXINT8LEN+1];
610-
611-
pg_lltoa(plannedstmt->queryId,buf);
612-
ExplainPropertyText("Query Identifier",buf,es);
609+
/*
610+
* Output the queryid as an int64 rather than a uint64 so we match
611+
* what would be seen in the BIGINT pg_stat_statements.queryid column.
612+
*/
613+
ExplainPropertyInteger("Query Identifier",NULL, (int64)
614+
plannedstmt->queryId,es);
613615
}
614616

615617
/* Show buffer usage in planning */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp