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

Commit41bd155

Browse files
committed
Fix two undocumented parameters to functions from ENR patch.
On ProcessUtility document the parameter, to match others.On CreateCachedPlan drop the queryEnv parameter. It was notreferenced within the function, and had been added on theassumption that with some unknown future usage of QueryEnvironmentit might be useful to do something there. We have avoided other"just in case" implementation of unused paramters, so drop it here.Per gripe from Tom Lane
1 parentc655899 commit41bd155

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

‎src/backend/commands/prepare.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ PrepareQuery(PrepareStmt *stmt, const char *queryString,
9191
* to see the unmodified raw parse tree.
9292
*/
9393
plansource=CreateCachedPlan(rawstmt,queryString,
94-
CreateCommandTag(stmt->query),NULL);
94+
CreateCommandTag(stmt->query));
9595

9696
/* Transform list of TypeNames to array of type OIDs */
9797
nargs=list_length(stmt->argtypes);

‎src/backend/executor/spi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,8 +1777,7 @@ _SPI_prepare_plan(const char *src, SPIPlanPtr plan)
17771777
*/
17781778
plansource=CreateCachedPlan(parsetree,
17791779
src,
1780-
CreateCommandTag(parsetree->stmt),
1781-
_SPI_current->queryEnv);
1780+
CreateCommandTag(parsetree->stmt));
17821781

17831782
/*
17841783
* Parameter datatypes are driven by parserSetup hook if provided,

‎src/backend/tcop/postgres.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,7 @@ exec_parse_message(const char *query_string,/* string to execute */
13181318
* Create the CachedPlanSource before we do parse analysis, since it
13191319
* needs to see the unmodified raw parse tree.
13201320
*/
1321-
psrc=CreateCachedPlan(raw_parse_tree,query_string,commandTag,
1322-
NULL);
1321+
psrc=CreateCachedPlan(raw_parse_tree,query_string,commandTag);
13231322

13241323
/*
13251324
* Set up a snapshot if parse analysis will need one.
@@ -1371,8 +1370,7 @@ exec_parse_message(const char *query_string,/* string to execute */
13711370
/* Empty input string. This is legal. */
13721371
raw_parse_tree=NULL;
13731372
commandTag=NULL;
1374-
psrc=CreateCachedPlan(raw_parse_tree,query_string,commandTag,
1375-
NULL);
1373+
psrc=CreateCachedPlan(raw_parse_tree,query_string,commandTag);
13761374
querytree_list=NIL;
13771375
}
13781376

‎src/backend/tcop/utility.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ CheckRestrictedOperation(const char *cmdname)
308308
*context: identifies source of statement (toplevel client command,
309309
*non-toplevel client command, subcommand of a larger utility command)
310310
*params: parameters to use during execution
311+
*queryEnv: environment for parse through execution (e.g., ephemeral named
312+
*tables like trigger transition tables). May be NULL.
311313
*dest: where to send results
312314
*completionTag: points to a buffer of size COMPLETION_TAG_BUFSIZE
313315
*in which to store a command completion status string.

‎src/backend/utils/cache/plancache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ InitPlanCache(void)
151151
CachedPlanSource*
152152
CreateCachedPlan(RawStmt*raw_parse_tree,
153153
constchar*query_string,
154-
constchar*commandTag,
155-
QueryEnvironment*queryEnv)
154+
constchar*commandTag)
156155
{
157156
CachedPlanSource*plansource;
158157
MemoryContextsource_context;

‎src/include/utils/plancache.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ extern void ResetPlanCache(void);
149149

150150
externCachedPlanSource*CreateCachedPlan(structRawStmt*raw_parse_tree,
151151
constchar*query_string,
152-
constchar*commandTag,
153-
QueryEnvironment*queryEnv);
152+
constchar*commandTag);
154153
externCachedPlanSource*CreateOneShotCachedPlan(structRawStmt*raw_parse_tree,
155154
constchar*query_string,
156155
constchar*commandTag);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp