diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
commit | def5b065ff22a16a80084587613599fe15627213 (patch) | |
tree | 13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/utils/misc/queryjumble.c | |
parent | e6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff) |
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files".
The only change worthy of note is that pgindent messed up the formatting
of launcher.c's struct LogicalRepWorkerId, which led me to notice that
that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/utils/misc/queryjumble.c')
-rw-r--r-- | src/backend/utils/misc/queryjumble.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/utils/misc/queryjumble.c b/src/backend/utils/misc/queryjumble.c index 1bb9fe20ea8..f004a9ce8cd 100644 --- a/src/backend/utils/misc/queryjumble.c +++ b/src/backend/utils/misc/queryjumble.c @@ -55,8 +55,8 @@ static void RecordConstLocation(JumbleState *jstate, int location); const char * CleanQuerytext(const char *query, int *location, int *len) { - int query_location = *location; - int query_len = *len; + int query_location = *location; + int query_len = *len; /* First apply starting offset, unless it's -1 (unknown). */ if (query_location >= 0) @@ -95,11 +95,12 @@ JumbleState * JumbleQuery(Query *query, const char *querytext) { JumbleState *jstate = NULL; + if (query->utilityStmt) { query->queryId = compute_utility_query_id(querytext, - query->stmt_location, - query->stmt_len); + query->stmt_location, + query->stmt_len); } else { @@ -137,12 +138,12 @@ JumbleQuery(Query *query, const char *querytext) static uint64 compute_utility_query_id(const char *query_text, int query_location, int query_len) { - uint64 queryId; + uint64 queryId; const char *sql; /* - * Confine our attention to the relevant part of the string, if the - * query is a portion of a multi-statement source string. + * Confine our attention to the relevant part of the string, if the query + * is a portion of a multi-statement source string. */ sql = CleanQuerytext(query_text, &query_location, &query_len); @@ -150,9 +151,8 @@ compute_utility_query_id(const char *query_text, int query_location, int query_l query_len, 0)); /* - * If we are unlucky enough to get a hash of zero(invalid), use - * queryID as 2 instead, queryID 1 is already in use for normal - * statements. + * If we are unlucky enough to get a hash of zero(invalid), use queryID as + * 2 instead, queryID 1 is already in use for normal statements. */ if (queryId == UINT64CONST(0)) queryId = UINT64CONST(2); |