1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Make plancache store cursor options so it can pass them to planner during

a replan.  I had originally thought this was not necessary, but the new
SPI facilities create a path whereby queries planned with non-default
options can get into the cache, so it is necessary.
This commit is contained in:
Tom Lane
2007-04-16 18:21:07 +00:00
parent f01b196597
commit 42dc4b66e6
6 changed files with 24 additions and 11 deletions

View File

@ -10,7 +10,7 @@
* Copyright (c) 2002-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.72 2007/04/16 01:14:55 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.73 2007/04/16 18:21:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -171,6 +171,7 @@ PrepareQuery(PrepareStmt *stmt, const char *queryString)
commandTag,
argtypes,
nargs,
0, /* default cursor options */
plan_list,
true);
}
@ -435,6 +436,7 @@ StorePreparedStatement(const char *stmt_name,
const char *commandTag,
Oid *param_types,
int num_params,
int cursor_options,
List *stmt_list,
bool from_sql)
{
@ -461,6 +463,7 @@ StorePreparedStatement(const char *stmt_name,
commandTag,
param_types,
num_params,
cursor_options,
stmt_list,
true,
true);