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

Commitdc9142f

Browse files
committed
When planning a query at Bind time, be careful to pass the correct
query_list into the Portal, ie, the one seen and possibly modified bythe planner. My fault :-( Per report from Sergey Koposov.
1 parent71a6f8b commitdc9142f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.512 2006/10/0719:25:28 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.513 2006/10/0720:16:57 tgl Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1294,6 +1294,7 @@ exec_bind_message(StringInfo input_message)
12941294
PreparedStatement*pstmt;
12951295
Portalportal;
12961296
ParamListInfoparams;
1297+
List*query_list;
12971298
List*plan_list;
12981299
MemoryContextqContext;
12991300
boolsave_log_statement_stats=log_statement_stats;
@@ -1572,13 +1573,13 @@ exec_bind_message(StringInfo input_message)
15721573

15731574
qContext=PortalGetHeapMemory(portal);
15741575
oldContext=MemoryContextSwitchTo(qContext);
1575-
plan_list=pg_plan_queries(copyObject(pstmt->query_list),
1576-
params,
1577-
true);
1576+
query_list=copyObject(pstmt->query_list);
1577+
plan_list=pg_plan_queries(query_list,params, true);
15781578
MemoryContextSwitchTo(oldContext);
15791579
}
15801580
else
15811581
{
1582+
query_list=pstmt->query_list;
15821583
plan_list=pstmt->plan_list;
15831584
qContext=pstmt->context;
15841585
}
@@ -1590,7 +1591,7 @@ exec_bind_message(StringInfo input_message)
15901591
*pstmt->stmt_name ?pstmt->stmt_name :NULL,
15911592
pstmt->query_string,
15921593
pstmt->commandTag,
1593-
pstmt->query_list,
1594+
query_list,
15941595
plan_list,
15951596
qContext);
15961597

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp