PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <limits.h>
#include "catalog/pg_type.h"
#include "nodes/nodeFuncs.h"
#include "parser/parse_param.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | FixedParamState |
struct | VarParamState |
Typedefs | |
typedef struct FixedParamState | FixedParamState |
typedef struct VarParamState | VarParamState |
Functions | |
static Node * | fixed_paramref_hook (ParseState *pstate, ParamRef *pref) |
static Node * | variable_paramref_hook (ParseState *pstate, ParamRef *pref) |
static Node * | variable_coerce_param_hook (ParseState *pstate, Param *param, Oid targetTypeId, int32 targetTypeMod, int location) |
static bool | check_parameter_resolution_walker (Node *node, ParseState *pstate) |
static bool | query_contains_extern_params_walker (Node *node, void *context) |
void | setup_parse_fixed_parameters (ParseState *pstate, const Oid *paramTypes, int numParams) |
void | setup_parse_variable_parameters (ParseState *pstate, Oid **paramTypes, int *numParams) |
void | check_variable_parameters (ParseState *pstate, Query *query) |
bool | query_contains_extern_params (Query *query) |
typedef struct FixedParamState FixedParamState |
typedef struct VarParamState VarParamState |
|
static |
Definition at line 287 of file parse_param.c.
References ereport, errcode(), errmsg(), ERROR, expression_tree_walker, if(), IsA, Param::location, VarParamState::numParams, ParseState::p_ref_hook_state, PARAM_EXTERN, Param::paramid, Param::paramkind, Param::paramtype, VarParamState::paramTypes, parser_errposition(), and query_tree_walker.
Referenced by check_variable_parameters().
void check_variable_parameters | ( | ParseState * | pstate, |
Query * | query | ||
) |
Definition at line 269 of file parse_param.c.
References check_parameter_resolution_walker(), if(), VarParamState::numParams, ParseState::p_ref_hook_state, and query_tree_walker.
Referenced by parse_analyze_varparams(), and transformExplainStmt().
|
static |
Definition at line 100 of file parse_param.c.
References ereport, errcode(), errmsg(), ERROR, get_typcollation(), if(), ParamRef::location, makeNode, ParamRef::number, FixedParamState::numParams, OidIsValid, ParseState::p_ref_hook_state, PARAM_EXTERN, FixedParamState::paramTypes, and parser_errposition().
Referenced by setup_parse_fixed_parameters().
Definition at line 331 of file parse_param.c.
References query_contains_extern_params_walker(), and query_tree_walker.
Referenced by transformCreateTableAsStmt().
Definition at line 339 of file parse_param.c.
References context, expression_tree_walker, IsA, PARAM_EXTERN, Param::paramkind, and query_tree_walker.
Referenced by query_contains_extern_params().
void setup_parse_fixed_parameters | ( | ParseState * | pstate, |
const Oid * | paramTypes, | ||
int | numParams | ||
) |
Definition at line 68 of file parse_param.c.
References fixed_paramref_hook(), FixedParamState::numParams, ParseState::p_paramref_hook, ParseState::p_ref_hook_state, palloc(), and FixedParamState::paramTypes.
Referenced by parse_analyze_fixedparams().
void setup_parse_variable_parameters | ( | ParseState * | pstate, |
Oid ** | paramTypes, | ||
int * | numParams | ||
) |
Definition at line 84 of file parse_param.c.
References VarParamState::numParams, ParseState::p_coerce_param_hook, ParseState::p_paramref_hook, ParseState::p_ref_hook_state, palloc(), VarParamState::paramTypes, variable_coerce_param_hook(), and variable_paramref_hook().
Referenced by parse_analyze_varparams(), and transformExplainStmt().
|
static |
Definition at line 187 of file parse_param.c.
References ereport, errcode(), errdetail(), errmsg(), ERROR, format_type_be(), get_typcollation(), if(), Param::location, VarParamState::numParams, ParseState::p_ref_hook_state, PARAM_EXTERN, Param::paramid, Param::paramkind, Param::paramtype, VarParamState::paramTypes, and parser_errposition().
Referenced by setup_parse_variable_parameters().
|
static |
Definition at line 132 of file parse_param.c.
References ereport, errcode(), errmsg(), ERROR, EXPR_KIND_CALL_ARGUMENT, get_typcollation(), if(), InvalidOid, ParamRef::location, makeNode, MaxAllocSize, ParamRef::number, VarParamState::numParams, ParseState::p_expr_kind, ParseState::p_ref_hook_state, palloc0_array, PARAM_EXTERN, VarParamState::paramTypes, parser_errposition(), and repalloc0_array.
Referenced by setup_parse_variable_parameters().