mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix EXPLAIN and EXECUTE commands to pass portal parameters through to
the executor. This allows, for example, JDBC clients to use '?' bound parameters in these commands. Per gripe from Virag Saksena.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.249 2005/11/22 18:17:22 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.250 2005/11/29 01:25:49 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -365,7 +365,7 @@ check_xact_readonly(Node *parsetree)
|
||||
* general utility function invoker
|
||||
*
|
||||
* parsetree: the parse tree for the utility statement
|
||||
* params: parameters to use during execution (currently only used by DECLARE)
|
||||
* params: parameters to use during execution
|
||||
* dest: where to send results
|
||||
* completionTag: points to a buffer of size COMPLETION_TAG_BUFSIZE
|
||||
* in which to store a command completion status string.
|
||||
@ -648,7 +648,8 @@ ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case T_ExecuteStmt:
|
||||
ExecuteQuery((ExecuteStmt *) parsetree, dest, completionTag);
|
||||
ExecuteQuery((ExecuteStmt *) parsetree, params,
|
||||
dest, completionTag);
|
||||
break;
|
||||
|
||||
case T_DeallocateStmt:
|
||||
@ -891,7 +892,7 @@ ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case T_ExplainStmt:
|
||||
ExplainQuery((ExplainStmt *) parsetree, dest);
|
||||
ExplainQuery((ExplainStmt *) parsetree, params, dest);
|
||||
break;
|
||||
|
||||
case T_VariableSetStmt:
|
||||
|
Reference in New Issue
Block a user