Header And Logo

PostgreSQL
| The world's most advanced open source database.

Functions

parse_param.h File Reference

#include "parser/parse_node.h"
Include dependency graph for parse_param.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void parse_fixed_parameters (ParseState *pstate, Oid *paramTypes, int numParams)
void parse_variable_parameters (ParseState *pstate, Oid **paramTypes, int *numParams)
void check_variable_parameters (ParseState *pstate, Query *query)
bool query_contains_extern_params (Query *query)

Function Documentation

void check_variable_parameters ( ParseState pstate,
Query query 
)

Definition at line 263 of file parse_param.c.

References check_parameter_resolution_walker(), VarParamState::numParams, ParseState::p_ref_hook_state, and query_tree_walker().

Referenced by parse_analyze_varparams().

{
    VarParamState *parstate = (VarParamState *) pstate->p_ref_hook_state;

    /* If numParams is zero then no Params were generated, so no work */
    if (*parstate->numParams > 0)
        (void) query_tree_walker(query,
                                 check_parameter_resolution_walker,
                                 (void *) pstate, 0);
}

void parse_fixed_parameters ( ParseState pstate,
Oid paramTypes,
int  numParams 
)

Definition at line 67 of file parse_param.c.

References FixedParamState::numParams, ParseState::p_paramref_hook, ParseState::p_ref_hook_state, palloc(), and FixedParamState::paramTypes.

Referenced by parse_analyze().

{
    FixedParamState *parstate = palloc(sizeof(FixedParamState));

    parstate->paramTypes = paramTypes;
    parstate->numParams = numParams;
    pstate->p_ref_hook_state = (void *) parstate;
    pstate->p_paramref_hook = fixed_paramref_hook;
    /* no need to use p_coerce_param_hook */
}

void parse_variable_parameters ( ParseState pstate,
Oid **  paramTypes,
int *  numParams 
)

Definition at line 83 of file parse_param.c.

References VarParamState::numParams, ParseState::p_coerce_param_hook, ParseState::p_paramref_hook, ParseState::p_ref_hook_state, palloc(), and VarParamState::paramTypes.

Referenced by parse_analyze_varparams().

{
    VarParamState *parstate = palloc(sizeof(VarParamState));

    parstate->paramTypes = paramTypes;
    parstate->numParams = numParams;
    pstate->p_ref_hook_state = (void *) parstate;
    pstate->p_paramref_hook = variable_paramref_hook;
    pstate->p_coerce_param_hook = variable_coerce_param_hook;
}

bool query_contains_extern_params ( Query query  )