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

Commit2ecbb0a

Browse files
committed
Remove dependency to query text in JumbleQuery()
Since 3db72eb, the query ID of utilities is generated using the Querystructure, making the use of the query string in JumbleQuery()unnecessary. This commit removes the argument "querytext" fromJumbleQuery().Reported-by: Joe ConwayReviewed-by: Nathan BossartDiscussion:https://postgr.es/m/ZJlQAWE4COFqHuAV@paquier.xyz
1 parent876d17d commit2ecbb0a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

‎src/backend/commands/explain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
255255

256256
query=castNode(Query,stmt->query);
257257
if (IsQueryIdEnabled())
258-
jstate=JumbleQuery(query,pstate->p_sourcetext);
258+
jstate=JumbleQuery(query);
259259

260260
if (post_parse_analyze_hook)
261261
(*post_parse_analyze_hook) (pstate,query,jstate);

‎src/backend/nodes/queryjumblefuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ CleanQuerytext(const char *query, int *location, int *len)
9797
}
9898

9999
JumbleState*
100-
JumbleQuery(Query*query,constchar*querytext)
100+
JumbleQuery(Query*query)
101101
{
102102
JumbleState*jstate=NULL;
103103

‎src/backend/parser/analyze.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ parse_analyze_fixedparams(RawStmt *parseTree, const char *sourceText,
124124
query=transformTopLevelStmt(pstate,parseTree);
125125

126126
if (IsQueryIdEnabled())
127-
jstate=JumbleQuery(query,sourceText);
127+
jstate=JumbleQuery(query);
128128

129129
if (post_parse_analyze_hook)
130130
(*post_parse_analyze_hook) (pstate,query,jstate);
@@ -166,7 +166,7 @@ parse_analyze_varparams(RawStmt *parseTree, const char *sourceText,
166166
check_variable_parameters(pstate,query);
167167

168168
if (IsQueryIdEnabled())
169-
jstate=JumbleQuery(query,sourceText);
169+
jstate=JumbleQuery(query);
170170

171171
if (post_parse_analyze_hook)
172172
(*post_parse_analyze_hook) (pstate,query,jstate);
@@ -203,7 +203,7 @@ parse_analyze_withcb(RawStmt *parseTree, const char *sourceText,
203203
query=transformTopLevelStmt(pstate,parseTree);
204204

205205
if (IsQueryIdEnabled())
206-
jstate=JumbleQuery(query,sourceText);
206+
jstate=JumbleQuery(query);
207207

208208
if (post_parse_analyze_hook)
209209
(*post_parse_analyze_hook) (pstate,query,jstate);

‎src/include/nodes/queryjumble.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extern PGDLLIMPORT int compute_query_id;
6464

6565

6666
externconstchar*CleanQuerytext(constchar*query,int*location,int*len);
67-
externJumbleState*JumbleQuery(Query*query,constchar*querytext);
67+
externJumbleState*JumbleQuery(Query*query);
6868
externvoidEnableQueryId(void);
6969

7070
externPGDLLIMPORTboolquery_id_enabled;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp