97 oprm = from->
paramFetch(from,
i + 1,
false, &prmdata);
134 int paramno = pref->
number;
145 prm = paramLI->
paramFetch(paramLI, paramno,
false, &prmdata);
147 prm = ¶mLI->
params[paramno - 1];
154 param->paramid = paramno;
155 param->paramtype = prm->ptype;
156 param->paramtypmod = -1;
160 return (
Node *) param;
170 Size sz =
sizeof(int);
172 if (paramLI == NULL || paramLI->
numParams <= 0)
185 prm = paramLI->
paramFetch(paramLI,
i + 1,
false, &prmdata);
189 typeOid = prm->
ptype;
200 typLen =
sizeof(
Datum);
235 if (paramLI == NULL || paramLI->
numParams <= 0)
239 memcpy(*start_address, &nparams,
sizeof(
int));
240 *start_address +=
sizeof(int);
243 for (
i = 0;
i < nparams;
i++)
253 prm = paramLI->
paramFetch(paramLI,
i + 1,
false, &prmdata);
257 typeOid = prm->
ptype;
260 memcpy(*start_address, &typeOid,
sizeof(
Oid));
261 *start_address +=
sizeof(
Oid);
265 *start_address +=
sizeof(
uint16);
273 typLen =
sizeof(
Datum);
297 memcpy(&nparams, *start_address,
sizeof(
int));
298 *start_address +=
sizeof(int);
302 for (
int i = 0;
i < nparams;
i++)
307 memcpy(&prm->
ptype, *start_address,
sizeof(
Oid));
308 *start_address +=
sizeof(
Oid);
312 *start_address +=
sizeof(
uint16);
361 "BuildParamLogString",
365 for (
int paramno = 0; paramno < params->
numParams; paramno++)
371 paramno > 0 ?
", " :
"",
378 if (knownTextValues != NULL && knownTextValues[paramno] != NULL)
412 data->params == NULL ||
413 data->params->paramValuesStr == NULL)
416 if (
data->portalName &&
data->portalName[0] !=
'\0')
417 errcontext(
"portal \"%s\" with parameters: %s",
418 data->portalName,
data->params->paramValuesStr);
420 errcontext(
"unnamed portal with parameters: %s",
421 data->params->paramValuesStr);
#define OidIsValid(objectId)
Datum datumCopy(Datum value, bool typByVal, int typLen)
Datum datumRestore(char **start_address, bool *isnull)
void datumSerialize(Datum value, bool isnull, bool typByVal, int typLen, char **start_address)
Size datumEstimateSpace(Datum value, bool isnull, bool typByVal, int typLen)
char * OidOutputFunctionCall(Oid functionId, Datum val)
if(TABLE==NULL||TABLE_index==NULL)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval)
Oid get_typcollation(Oid typid)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
ParamListInfo makeParamList(int numParams)
ParamListInfo copyParamList(ParamListInfo from)
static Node * paramlist_param_ref(ParseState *pstate, ParamRef *pref)
static void paramlist_parser_setup(ParseState *pstate, void *arg)
Size EstimateParamListSpace(ParamListInfo paramLI)
char * BuildParamLogString(ParamListInfo params, char **knownTextValues, int maxlen)
void SerializeParamList(ParamListInfo paramLI, char **start_address)
void ParamsErrorCallback(void *arg)
ParamListInfo RestoreParamList(char **start_address)
struct ParamListInfoData * ParamListInfo
struct ParamExternData ParamExternData
MemoryContextSwitchTo(old_ctx)
Size add_size(Size s1, Size s2)
static pg_noinline void Size size
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void initStringInfo(StringInfo str)
void appendStringInfoStringQuoted(StringInfo str, const char *s, int maxlen)
ParamExternData params[FLEXIBLE_ARRAY_MEMBER]
ParserSetupHook parserSetup
ParamCompileHook paramCompile
ParamFetchHook paramFetch
ParseParamRefHook p_paramref_hook
bool IsAbortedTransactionBlockState(void)