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)
12941294PreparedStatement * pstmt ;
12951295Portal portal ;
12961296ParamListInfo params ;
1297+ List * query_list ;
12971298List * plan_list ;
12981299MemoryContext qContext ;
12991300bool save_log_statement_stats = log_statement_stats ;
@@ -1572,13 +1573,13 @@ exec_bind_message(StringInfo input_message)
15721573
15731574qContext = PortalGetHeapMemory (portal );
15741575oldContext = 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);
15781578MemoryContextSwitchTo (oldContext );
15791579}
15801580else
15811581{
1582+ query_list = pstmt -> query_list ;
15821583plan_list = pstmt -> plan_list ;
15831584qContext = pstmt -> context ;
15841585}
@@ -1590,7 +1591,7 @@ exec_bind_message(StringInfo input_message)
15901591* pstmt -> stmt_name ?pstmt -> stmt_name :NULL ,
15911592pstmt -> query_string ,
15921593pstmt -> commandTag ,
1593- pstmt -> query_list ,
1594+ query_list ,
15941595plan_list ,
15951596qContext );
15961597