mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Refactor ParamListInfo initialization
There were six copies of identical nontrivial code. Put it into a function.
This commit is contained in:
@ -1731,16 +1731,7 @@ exec_bind_message(StringInfo input_message)
|
||||
*/
|
||||
if (numParams > 0)
|
||||
{
|
||||
params = (ParamListInfo) palloc(offsetof(ParamListInfoData, params) +
|
||||
numParams * sizeof(ParamExternData));
|
||||
/* we have static list of params, so no hooks needed */
|
||||
params->paramFetch = NULL;
|
||||
params->paramFetchArg = NULL;
|
||||
params->paramCompile = NULL;
|
||||
params->paramCompileArg = NULL;
|
||||
params->parserSetup = NULL;
|
||||
params->parserSetupArg = NULL;
|
||||
params->numParams = numParams;
|
||||
params = makeParamList(numParams);
|
||||
|
||||
for (int paramno = 0; paramno < numParams; paramno++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user