mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
|
||||
static char *fetch_cursor_param_value(ExprContext *econtext, int paramId);
|
||||
static ScanState *search_plan_tree(PlanState *node, Oid table_oid,
|
||||
bool *pending_rescan);
|
||||
bool *pending_rescan);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -57,28 +57,28 @@ typedef struct LastAttnumInfo
|
||||
|
||||
static void ExecReadyExpr(ExprState *state);
|
||||
static void ExecInitExprRec(Expr *node, ExprState *state,
|
||||
Datum *resv, bool *resnull);
|
||||
Datum *resv, bool *resnull);
|
||||
static void ExecInitFunc(ExprEvalStep *scratch, Expr *node, List *args,
|
||||
Oid funcid, Oid inputcollid,
|
||||
ExprState *state);
|
||||
Oid funcid, Oid inputcollid,
|
||||
ExprState *state);
|
||||
static void ExecInitExprSlots(ExprState *state, Node *node);
|
||||
static void ExecPushExprSlots(ExprState *state, LastAttnumInfo *info);
|
||||
static bool get_last_attnums_walker(Node *node, LastAttnumInfo *info);
|
||||
static void ExecComputeSlotInfo(ExprState *state, ExprEvalStep *op);
|
||||
static void ExecInitWholeRowVar(ExprEvalStep *scratch, Var *variable,
|
||||
ExprState *state);
|
||||
ExprState *state);
|
||||
static void ExecInitSubscriptingRef(ExprEvalStep *scratch,
|
||||
SubscriptingRef *sbsref,
|
||||
ExprState *state,
|
||||
Datum *resv, bool *resnull);
|
||||
SubscriptingRef *sbsref,
|
||||
ExprState *state,
|
||||
Datum *resv, bool *resnull);
|
||||
static bool isAssignmentIndirectionExpr(Expr *expr);
|
||||
static void ExecInitCoerceToDomain(ExprEvalStep *scratch, CoerceToDomain *ctest,
|
||||
ExprState *state,
|
||||
Datum *resv, bool *resnull);
|
||||
ExprState *state,
|
||||
Datum *resv, bool *resnull);
|
||||
static void ExecBuildAggTransCall(ExprState *state, AggState *aggstate,
|
||||
ExprEvalStep *scratch,
|
||||
FunctionCallInfo fcinfo, AggStatePerTrans pertrans,
|
||||
int transno, int setno, int setoff, bool ishash);
|
||||
ExprEvalStep *scratch,
|
||||
FunctionCallInfo fcinfo, AggStatePerTrans pertrans,
|
||||
int transno, int setno, int setoff, bool ishash);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -145,10 +145,10 @@ static void ExecInitInterpreter(void);
|
||||
static void CheckVarSlotCompatibility(TupleTableSlot *slot, int attnum, Oid vartype);
|
||||
static void CheckOpSlotCompatibility(ExprEvalStep *op, TupleTableSlot *slot);
|
||||
static TupleDesc get_cached_rowtype(Oid type_id, int32 typmod,
|
||||
TupleDesc *cache_field, ExprContext *econtext);
|
||||
TupleDesc *cache_field, ExprContext *econtext);
|
||||
static void ShutdownTupleDescRef(Datum arg);
|
||||
static void ExecEvalRowNullInt(ExprState *state, ExprEvalStep *op,
|
||||
ExprContext *econtext, bool checkisnull);
|
||||
ExprContext *econtext, bool checkisnull);
|
||||
|
||||
/* fast-path evaluation functions */
|
||||
static Datum ExecJustInnerVar(ExprState *state, ExprContext *econtext, bool *isnull);
|
||||
|
@ -125,17 +125,17 @@ typedef enum
|
||||
} CEOUC_WAIT_MODE;
|
||||
|
||||
static bool check_exclusion_or_unique_constraint(Relation heap, Relation index,
|
||||
IndexInfo *indexInfo,
|
||||
ItemPointer tupleid,
|
||||
Datum *values, bool *isnull,
|
||||
EState *estate, bool newIndex,
|
||||
CEOUC_WAIT_MODE waitMode,
|
||||
bool errorOK,
|
||||
ItemPointer conflictTid);
|
||||
IndexInfo *indexInfo,
|
||||
ItemPointer tupleid,
|
||||
Datum *values, bool *isnull,
|
||||
EState *estate, bool newIndex,
|
||||
CEOUC_WAIT_MODE waitMode,
|
||||
bool errorOK,
|
||||
ItemPointer conflictTid);
|
||||
|
||||
static bool index_recheck_constraint(Relation index, Oid *constr_procs,
|
||||
Datum *existing_values, bool *existing_isnull,
|
||||
Datum *new_values);
|
||||
Datum *existing_values, bool *existing_isnull,
|
||||
Datum *new_values);
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* ExecOpenIndices
|
||||
|
@ -81,25 +81,25 @@ static void CheckValidRowMarkRel(Relation rel, RowMarkType markType);
|
||||
static void ExecPostprocessPlan(EState *estate);
|
||||
static void ExecEndPlan(PlanState *planstate, EState *estate);
|
||||
static void ExecutePlan(EState *estate, PlanState *planstate,
|
||||
bool use_parallel_mode,
|
||||
CmdType operation,
|
||||
bool sendTuples,
|
||||
uint64 numberTuples,
|
||||
ScanDirection direction,
|
||||
DestReceiver *dest,
|
||||
bool execute_once);
|
||||
bool use_parallel_mode,
|
||||
CmdType operation,
|
||||
bool sendTuples,
|
||||
uint64 numberTuples,
|
||||
ScanDirection direction,
|
||||
DestReceiver *dest,
|
||||
bool execute_once);
|
||||
static bool ExecCheckRTEPerms(RangeTblEntry *rte);
|
||||
static bool ExecCheckRTEPermsModified(Oid relOid, Oid userid,
|
||||
Bitmapset *modifiedCols,
|
||||
AclMode requiredPerms);
|
||||
Bitmapset *modifiedCols,
|
||||
AclMode requiredPerms);
|
||||
static void ExecCheckXactReadOnly(PlannedStmt *plannedstmt);
|
||||
static char *ExecBuildSlotValueDescription(Oid reloid,
|
||||
TupleTableSlot *slot,
|
||||
TupleDesc tupdesc,
|
||||
Bitmapset *modifiedCols,
|
||||
int maxfieldlen);
|
||||
TupleTableSlot *slot,
|
||||
TupleDesc tupdesc,
|
||||
Bitmapset *modifiedCols,
|
||||
int maxfieldlen);
|
||||
static void EvalPlanQualStart(EPQState *epqstate, EState *parentestate,
|
||||
Plan *planTree);
|
||||
Plan *planTree);
|
||||
|
||||
/*
|
||||
* Note that GetAllUpdatedColumns() also exists in commands/trigger.c. There does
|
||||
|
@ -123,15 +123,15 @@ typedef struct ExecParallelInitializeDSMContext
|
||||
/* Helper functions that run in the parallel leader. */
|
||||
static char *ExecSerializePlan(Plan *plan, EState *estate);
|
||||
static bool ExecParallelEstimate(PlanState *node,
|
||||
ExecParallelEstimateContext *e);
|
||||
ExecParallelEstimateContext *e);
|
||||
static bool ExecParallelInitializeDSM(PlanState *node,
|
||||
ExecParallelInitializeDSMContext *d);
|
||||
ExecParallelInitializeDSMContext *d);
|
||||
static shm_mq_handle **ExecParallelSetupTupleQueues(ParallelContext *pcxt,
|
||||
bool reinitialize);
|
||||
bool reinitialize);
|
||||
static bool ExecParallelReInitializeDSM(PlanState *planstate,
|
||||
ParallelContext *pcxt);
|
||||
ParallelContext *pcxt);
|
||||
static bool ExecParallelRetrieveInstrumentation(PlanState *planstate,
|
||||
SharedExecutorInstrumentation *instrumentation);
|
||||
SharedExecutorInstrumentation *instrumentation);
|
||||
|
||||
/* Helper function that runs in the parallel worker. */
|
||||
static DestReceiver *ExecParallelGetReceiver(dsm_segment *seg, shm_toc *toc);
|
||||
|
@ -156,42 +156,42 @@ typedef struct SubplanResultRelHashElem
|
||||
|
||||
|
||||
static void ExecHashSubPlanResultRelsByOid(ModifyTableState *mtstate,
|
||||
PartitionTupleRouting *proute);
|
||||
PartitionTupleRouting *proute);
|
||||
static ResultRelInfo *ExecInitPartitionInfo(ModifyTableState *mtstate,
|
||||
EState *estate, PartitionTupleRouting *proute,
|
||||
PartitionDispatch dispatch,
|
||||
ResultRelInfo *rootResultRelInfo,
|
||||
int partidx);
|
||||
EState *estate, PartitionTupleRouting *proute,
|
||||
PartitionDispatch dispatch,
|
||||
ResultRelInfo *rootResultRelInfo,
|
||||
int partidx);
|
||||
static void ExecInitRoutingInfo(ModifyTableState *mtstate,
|
||||
EState *estate,
|
||||
PartitionTupleRouting *proute,
|
||||
PartitionDispatch dispatch,
|
||||
ResultRelInfo *partRelInfo,
|
||||
int partidx);
|
||||
EState *estate,
|
||||
PartitionTupleRouting *proute,
|
||||
PartitionDispatch dispatch,
|
||||
ResultRelInfo *partRelInfo,
|
||||
int partidx);
|
||||
static PartitionDispatch ExecInitPartitionDispatchInfo(EState *estate,
|
||||
PartitionTupleRouting *proute,
|
||||
Oid partoid, PartitionDispatch parent_pd, int partidx);
|
||||
PartitionTupleRouting *proute,
|
||||
Oid partoid, PartitionDispatch parent_pd, int partidx);
|
||||
static void FormPartitionKeyDatum(PartitionDispatch pd,
|
||||
TupleTableSlot *slot,
|
||||
EState *estate,
|
||||
Datum *values,
|
||||
bool *isnull);
|
||||
static int get_partition_for_tuple(PartitionDispatch pd, Datum *values,
|
||||
bool *isnull);
|
||||
TupleTableSlot *slot,
|
||||
EState *estate,
|
||||
Datum *values,
|
||||
bool *isnull);
|
||||
static int get_partition_for_tuple(PartitionDispatch pd, Datum *values,
|
||||
bool *isnull);
|
||||
static char *ExecBuildSlotPartitionKeyDescription(Relation rel,
|
||||
Datum *values,
|
||||
bool *isnull,
|
||||
int maxfieldlen);
|
||||
Datum *values,
|
||||
bool *isnull,
|
||||
int maxfieldlen);
|
||||
static List *adjust_partition_tlist(List *tlist, TupleConversionMap *map);
|
||||
static void ExecInitPruningContext(PartitionPruneContext *context,
|
||||
List *pruning_steps,
|
||||
PartitionDesc partdesc,
|
||||
PartitionKey partkey,
|
||||
PlanState *planstate);
|
||||
List *pruning_steps,
|
||||
PartitionDesc partdesc,
|
||||
PartitionKey partkey,
|
||||
PlanState *planstate);
|
||||
static void find_matching_subplans_recurse(PartitionPruningData *prunedata,
|
||||
PartitionedRelPruningData *pprune,
|
||||
bool initial_prune,
|
||||
Bitmapset **validsubplans);
|
||||
PartitionedRelPruningData *pprune,
|
||||
bool initial_prune,
|
||||
Bitmapset **validsubplans);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -35,15 +35,15 @@
|
||||
|
||||
/* static function decls */
|
||||
static void init_sexpr(Oid foid, Oid input_collation, Expr *node,
|
||||
SetExprState *sexpr, PlanState *parent,
|
||||
MemoryContext sexprCxt, bool allowSRF, bool needDescForSRF);
|
||||
SetExprState *sexpr, PlanState *parent,
|
||||
MemoryContext sexprCxt, bool allowSRF, bool needDescForSRF);
|
||||
static void ShutdownSetExpr(Datum arg);
|
||||
static void ExecEvalFuncArgs(FunctionCallInfo fcinfo,
|
||||
List *argList, ExprContext *econtext);
|
||||
List *argList, ExprContext *econtext);
|
||||
static void ExecPrepareTuplestoreResult(SetExprState *sexpr,
|
||||
ExprContext *econtext,
|
||||
Tuplestorestate *resultStore,
|
||||
TupleDesc resultDesc);
|
||||
ExprContext *econtext,
|
||||
Tuplestorestate *resultStore,
|
||||
TupleDesc resultDesc);
|
||||
static void tupledesc_match(TupleDesc dst_tupdesc, TupleDesc src_tupdesc);
|
||||
|
||||
|
||||
|
@ -70,13 +70,13 @@
|
||||
|
||||
|
||||
static TupleDesc ExecTypeFromTLInternal(List *targetList,
|
||||
bool skipjunk);
|
||||
bool skipjunk);
|
||||
static pg_attribute_always_inline void slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,
|
||||
int natts);
|
||||
int natts);
|
||||
static inline void tts_buffer_heap_store_tuple(TupleTableSlot *slot,
|
||||
HeapTuple tuple,
|
||||
Buffer buffer,
|
||||
bool transfer_pin);
|
||||
HeapTuple tuple,
|
||||
Buffer buffer,
|
||||
bool transfer_pin);
|
||||
static void tts_heap_store_tuple(TupleTableSlot *slot, HeapTuple tuple, bool shouldFree);
|
||||
|
||||
|
||||
|
@ -146,24 +146,24 @@ typedef struct SQLFunctionParseInfo
|
||||
/* non-export function prototypes */
|
||||
static Node *sql_fn_param_ref(ParseState *pstate, ParamRef *pref);
|
||||
static Node *sql_fn_post_column_ref(ParseState *pstate,
|
||||
ColumnRef *cref, Node *var);
|
||||
ColumnRef *cref, Node *var);
|
||||
static Node *sql_fn_make_param(SQLFunctionParseInfoPtr pinfo,
|
||||
int paramno, int location);
|
||||
int paramno, int location);
|
||||
static Node *sql_fn_resolve_param_name(SQLFunctionParseInfoPtr pinfo,
|
||||
const char *paramname, int location);
|
||||
const char *paramname, int location);
|
||||
static List *init_execution_state(List *queryTree_list,
|
||||
SQLFunctionCachePtr fcache,
|
||||
bool lazyEvalOK);
|
||||
SQLFunctionCachePtr fcache,
|
||||
bool lazyEvalOK);
|
||||
static void init_sql_fcache(FmgrInfo *finfo, Oid collation, bool lazyEvalOK);
|
||||
static void postquel_start(execution_state *es, SQLFunctionCachePtr fcache);
|
||||
static bool postquel_getnext(execution_state *es, SQLFunctionCachePtr fcache);
|
||||
static void postquel_end(execution_state *es);
|
||||
static void postquel_sub_params(SQLFunctionCachePtr fcache,
|
||||
FunctionCallInfo fcinfo);
|
||||
FunctionCallInfo fcinfo);
|
||||
static Datum postquel_get_single_result(TupleTableSlot *slot,
|
||||
FunctionCallInfo fcinfo,
|
||||
SQLFunctionCachePtr fcache,
|
||||
MemoryContext resultcontext);
|
||||
FunctionCallInfo fcinfo,
|
||||
SQLFunctionCachePtr fcache,
|
||||
MemoryContext resultcontext);
|
||||
static void sql_exec_error_callback(void *arg);
|
||||
static void ShutdownSQLFunction(Datum arg);
|
||||
static void sqlfunction_startup(DestReceiver *self, int operation, TupleDesc typeinfo);
|
||||
|
@ -22,7 +22,7 @@ static BufferUsage save_pgBufferUsage;
|
||||
|
||||
static void BufferUsageAdd(BufferUsage *dst, const BufferUsage *add);
|
||||
static void BufferUsageAccumDiff(BufferUsage *dst,
|
||||
const BufferUsage *add, const BufferUsage *sub);
|
||||
const BufferUsage *add, const BufferUsage *sub);
|
||||
|
||||
|
||||
/* Allocate new instrumentation structure(s) */
|
||||
|
@ -242,32 +242,32 @@ static void select_current_set(AggState *aggstate, int setno, bool is_hash);
|
||||
static void initialize_phase(AggState *aggstate, int newphase);
|
||||
static TupleTableSlot *fetch_input_tuple(AggState *aggstate);
|
||||
static void initialize_aggregates(AggState *aggstate,
|
||||
AggStatePerGroup *pergroups,
|
||||
int numReset);
|
||||
AggStatePerGroup *pergroups,
|
||||
int numReset);
|
||||
static void advance_transition_function(AggState *aggstate,
|
||||
AggStatePerTrans pertrans,
|
||||
AggStatePerGroup pergroupstate);
|
||||
AggStatePerTrans pertrans,
|
||||
AggStatePerGroup pergroupstate);
|
||||
static void advance_aggregates(AggState *aggstate);
|
||||
static void process_ordered_aggregate_single(AggState *aggstate,
|
||||
AggStatePerTrans pertrans,
|
||||
AggStatePerGroup pergroupstate);
|
||||
AggStatePerTrans pertrans,
|
||||
AggStatePerGroup pergroupstate);
|
||||
static void process_ordered_aggregate_multi(AggState *aggstate,
|
||||
AggStatePerTrans pertrans,
|
||||
AggStatePerGroup pergroupstate);
|
||||
AggStatePerTrans pertrans,
|
||||
AggStatePerGroup pergroupstate);
|
||||
static void finalize_aggregate(AggState *aggstate,
|
||||
AggStatePerAgg peragg,
|
||||
AggStatePerGroup pergroupstate,
|
||||
Datum *resultVal, bool *resultIsNull);
|
||||
AggStatePerAgg peragg,
|
||||
AggStatePerGroup pergroupstate,
|
||||
Datum *resultVal, bool *resultIsNull);
|
||||
static void finalize_partialaggregate(AggState *aggstate,
|
||||
AggStatePerAgg peragg,
|
||||
AggStatePerGroup pergroupstate,
|
||||
Datum *resultVal, bool *resultIsNull);
|
||||
AggStatePerAgg peragg,
|
||||
AggStatePerGroup pergroupstate,
|
||||
Datum *resultVal, bool *resultIsNull);
|
||||
static void prepare_projection_slot(AggState *aggstate,
|
||||
TupleTableSlot *slot,
|
||||
int currentSet);
|
||||
TupleTableSlot *slot,
|
||||
int currentSet);
|
||||
static void finalize_aggregates(AggState *aggstate,
|
||||
AggStatePerAgg peragg,
|
||||
AggStatePerGroup pergroup);
|
||||
AggStatePerAgg peragg,
|
||||
AggStatePerGroup pergroup);
|
||||
static TupleTableSlot *project_aggregates(AggState *aggstate);
|
||||
static Bitmapset *find_unaggregated_cols(AggState *aggstate);
|
||||
static bool find_unaggregated_cols_walker(Node *node, Bitmapset **colnos);
|
||||
@ -279,19 +279,19 @@ static void agg_fill_hash_table(AggState *aggstate);
|
||||
static TupleTableSlot *agg_retrieve_hash_table(AggState *aggstate);
|
||||
static Datum GetAggInitVal(Datum textInitVal, Oid transtype);
|
||||
static void build_pertrans_for_aggref(AggStatePerTrans pertrans,
|
||||
AggState *aggstate, EState *estate,
|
||||
Aggref *aggref, Oid aggtransfn, Oid aggtranstype,
|
||||
Oid aggserialfn, Oid aggdeserialfn,
|
||||
Datum initValue, bool initValueIsNull,
|
||||
Oid *inputTypes, int numArguments);
|
||||
static int find_compatible_peragg(Aggref *newagg, AggState *aggstate,
|
||||
int lastaggno, List **same_input_transnos);
|
||||
static int find_compatible_pertrans(AggState *aggstate, Aggref *newagg,
|
||||
bool shareable,
|
||||
Oid aggtransfn, Oid aggtranstype,
|
||||
Oid aggserialfn, Oid aggdeserialfn,
|
||||
Datum initValue, bool initValueIsNull,
|
||||
List *transnos);
|
||||
AggState *aggstate, EState *estate,
|
||||
Aggref *aggref, Oid aggtransfn, Oid aggtranstype,
|
||||
Oid aggserialfn, Oid aggdeserialfn,
|
||||
Datum initValue, bool initValueIsNull,
|
||||
Oid *inputTypes, int numArguments);
|
||||
static int find_compatible_peragg(Aggref *newagg, AggState *aggstate,
|
||||
int lastaggno, List **same_input_transnos);
|
||||
static int find_compatible_pertrans(AggState *aggstate, Aggref *newagg,
|
||||
bool shareable,
|
||||
Oid aggtransfn, Oid aggtranstype,
|
||||
Oid aggserialfn, Oid aggdeserialfn,
|
||||
Datum initValue, bool initValueIsNull,
|
||||
List *transnos);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -55,14 +55,14 @@
|
||||
|
||||
static TupleTableSlot *BitmapHeapNext(BitmapHeapScanState *node);
|
||||
static inline void BitmapDoneInitializingSharedState(
|
||||
ParallelBitmapHeapState *pstate);
|
||||
ParallelBitmapHeapState *pstate);
|
||||
static inline void BitmapAdjustPrefetchIterator(BitmapHeapScanState *node,
|
||||
TBMIterateResult *tbmres);
|
||||
TBMIterateResult *tbmres);
|
||||
static inline void BitmapAdjustPrefetchTarget(BitmapHeapScanState *node);
|
||||
static inline void BitmapPrefetch(BitmapHeapScanState *node,
|
||||
TableScanDesc scan);
|
||||
TableScanDesc scan);
|
||||
static bool BitmapShouldInitializeSharedState(
|
||||
ParallelBitmapHeapState *pstate);
|
||||
ParallelBitmapHeapState *pstate);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
|
@ -55,13 +55,13 @@ static TupleTableSlot *ExecGatherMerge(PlanState *pstate);
|
||||
static int32 heap_compare_slots(Datum a, Datum b, void *arg);
|
||||
static TupleTableSlot *gather_merge_getnext(GatherMergeState *gm_state);
|
||||
static HeapTuple gm_readnext_tuple(GatherMergeState *gm_state, int nreader,
|
||||
bool nowait, bool *done);
|
||||
bool nowait, bool *done);
|
||||
static void ExecShutdownGatherMergeWorkers(GatherMergeState *node);
|
||||
static void gather_merge_setup(GatherMergeState *gm_state);
|
||||
static void gather_merge_init(GatherMergeState *gm_state);
|
||||
static void gather_merge_clear_tuples(GatherMergeState *gm_state);
|
||||
static bool gather_merge_readnext(GatherMergeState *gm_state, int reader,
|
||||
bool nowait);
|
||||
bool nowait);
|
||||
static void load_tuple_array(GatherMergeState *gm_state, int reader);
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
|
@ -48,35 +48,35 @@ static void ExecHashIncreaseNumBuckets(HashJoinTable hashtable);
|
||||
static void ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable);
|
||||
static void ExecParallelHashIncreaseNumBuckets(HashJoinTable hashtable);
|
||||
static void ExecHashBuildSkewHash(HashJoinTable hashtable, Hash *node,
|
||||
int mcvsToUse);
|
||||
int mcvsToUse);
|
||||
static void ExecHashSkewTableInsert(HashJoinTable hashtable,
|
||||
TupleTableSlot *slot,
|
||||
uint32 hashvalue,
|
||||
int bucketNumber);
|
||||
TupleTableSlot *slot,
|
||||
uint32 hashvalue,
|
||||
int bucketNumber);
|
||||
static void ExecHashRemoveNextSkewBucket(HashJoinTable hashtable);
|
||||
|
||||
static void *dense_alloc(HashJoinTable hashtable, Size size);
|
||||
static HashJoinTuple ExecParallelHashTupleAlloc(HashJoinTable hashtable,
|
||||
size_t size,
|
||||
dsa_pointer *shared);
|
||||
size_t size,
|
||||
dsa_pointer *shared);
|
||||
static void MultiExecPrivateHash(HashState *node);
|
||||
static void MultiExecParallelHash(HashState *node);
|
||||
static inline HashJoinTuple ExecParallelHashFirstTuple(HashJoinTable table,
|
||||
int bucketno);
|
||||
int bucketno);
|
||||
static inline HashJoinTuple ExecParallelHashNextTuple(HashJoinTable table,
|
||||
HashJoinTuple tuple);
|
||||
HashJoinTuple tuple);
|
||||
static inline void ExecParallelHashPushTuple(dsa_pointer_atomic *head,
|
||||
HashJoinTuple tuple,
|
||||
dsa_pointer tuple_shared);
|
||||
HashJoinTuple tuple,
|
||||
dsa_pointer tuple_shared);
|
||||
static void ExecParallelHashJoinSetUpBatches(HashJoinTable hashtable, int nbatch);
|
||||
static void ExecParallelHashEnsureBatchAccessors(HashJoinTable hashtable);
|
||||
static void ExecParallelHashRepartitionFirst(HashJoinTable hashtable);
|
||||
static void ExecParallelHashRepartitionRest(HashJoinTable hashtable);
|
||||
static HashMemoryChunk ExecParallelHashPopChunkQueue(HashJoinTable table,
|
||||
dsa_pointer *shared);
|
||||
dsa_pointer *shared);
|
||||
static bool ExecParallelHashTuplePrealloc(HashJoinTable hashtable,
|
||||
int batchno,
|
||||
size_t size);
|
||||
int batchno,
|
||||
size_t size);
|
||||
static void ExecParallelHashMergeCounters(HashJoinTable hashtable);
|
||||
static void ExecParallelHashCloseBatchAccessors(HashJoinTable hashtable);
|
||||
|
||||
|
@ -134,15 +134,15 @@
|
||||
#define HJ_FILL_INNER(hjstate) ((hjstate)->hj_NullOuterTupleSlot != NULL)
|
||||
|
||||
static TupleTableSlot *ExecHashJoinOuterGetTuple(PlanState *outerNode,
|
||||
HashJoinState *hjstate,
|
||||
uint32 *hashvalue);
|
||||
HashJoinState *hjstate,
|
||||
uint32 *hashvalue);
|
||||
static TupleTableSlot *ExecParallelHashJoinOuterGetTuple(PlanState *outerNode,
|
||||
HashJoinState *hjstate,
|
||||
uint32 *hashvalue);
|
||||
HashJoinState *hjstate,
|
||||
uint32 *hashvalue);
|
||||
static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
|
||||
BufFile *file,
|
||||
uint32 *hashvalue,
|
||||
TupleTableSlot *tupleSlot);
|
||||
BufFile *file,
|
||||
uint32 *hashvalue,
|
||||
TupleTableSlot *tupleSlot);
|
||||
static bool ExecHashJoinNewBatch(HashJoinState *hjstate);
|
||||
static bool ExecParallelHashJoinNewBatch(HashJoinState *hjstate);
|
||||
static void ExecParallelHashJoinPartitionOuter(HashJoinState *node);
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
static TupleTableSlot *IndexOnlyNext(IndexOnlyScanState *node);
|
||||
static void StoreIndexTuple(TupleTableSlot *slot, IndexTuple itup,
|
||||
TupleDesc itupdesc);
|
||||
TupleDesc itupdesc);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
|
@ -60,13 +60,13 @@ static TupleTableSlot *IndexNext(IndexScanState *node);
|
||||
static TupleTableSlot *IndexNextWithReorder(IndexScanState *node);
|
||||
static void EvalOrderByExpressions(IndexScanState *node, ExprContext *econtext);
|
||||
static bool IndexRecheck(IndexScanState *node, TupleTableSlot *slot);
|
||||
static int cmp_orderbyvals(const Datum *adist, const bool *anulls,
|
||||
const Datum *bdist, const bool *bnulls,
|
||||
IndexScanState *node);
|
||||
static int reorderqueue_cmp(const pairingheap_node *a,
|
||||
const pairingheap_node *b, void *arg);
|
||||
static int cmp_orderbyvals(const Datum *adist, const bool *anulls,
|
||||
const Datum *bdist, const bool *bnulls,
|
||||
IndexScanState *node);
|
||||
static int reorderqueue_cmp(const pairingheap_node *a,
|
||||
const pairingheap_node *b, void *arg);
|
||||
static void reorderqueue_push(IndexScanState *node, TupleTableSlot *slot,
|
||||
Datum *orderbyvals, bool *orderbynulls);
|
||||
Datum *orderbyvals, bool *orderbynulls);
|
||||
static HeapTuple reorderqueue_pop(IndexScanState *node);
|
||||
|
||||
|
||||
|
@ -59,22 +59,22 @@
|
||||
|
||||
|
||||
static bool ExecOnConflictUpdate(ModifyTableState *mtstate,
|
||||
ResultRelInfo *resultRelInfo,
|
||||
ItemPointer conflictTid,
|
||||
TupleTableSlot *planSlot,
|
||||
TupleTableSlot *excludedSlot,
|
||||
EState *estate,
|
||||
bool canSetTag,
|
||||
TupleTableSlot **returning);
|
||||
ResultRelInfo *resultRelInfo,
|
||||
ItemPointer conflictTid,
|
||||
TupleTableSlot *planSlot,
|
||||
TupleTableSlot *excludedSlot,
|
||||
EState *estate,
|
||||
bool canSetTag,
|
||||
TupleTableSlot **returning);
|
||||
static TupleTableSlot *ExecPrepareTupleRouting(ModifyTableState *mtstate,
|
||||
EState *estate,
|
||||
PartitionTupleRouting *proute,
|
||||
ResultRelInfo *targetRelInfo,
|
||||
TupleTableSlot *slot);
|
||||
EState *estate,
|
||||
PartitionTupleRouting *proute,
|
||||
ResultRelInfo *targetRelInfo,
|
||||
TupleTableSlot *slot);
|
||||
static ResultRelInfo *getTargetResultRelInfo(ModifyTableState *node);
|
||||
static void ExecSetupChildParentMapForSubplan(ModifyTableState *mtstate);
|
||||
static TupleConversionMap *tupconv_map_for_subplan(ModifyTableState *node,
|
||||
int whichplan);
|
||||
int whichplan);
|
||||
|
||||
/*
|
||||
* Verify that the tuples to be produced by INSERT or UPDATE match the
|
||||
|
@ -41,14 +41,14 @@
|
||||
|
||||
|
||||
static Datum ExecHashSubPlan(SubPlanState *node,
|
||||
ExprContext *econtext,
|
||||
bool *isNull);
|
||||
ExprContext *econtext,
|
||||
bool *isNull);
|
||||
static Datum ExecScanSubPlan(SubPlanState *node,
|
||||
ExprContext *econtext,
|
||||
bool *isNull);
|
||||
ExprContext *econtext,
|
||||
bool *isNull);
|
||||
static void buildSubPlanHash(SubPlanState *node, ExprContext *econtext);
|
||||
static bool findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot,
|
||||
FmgrInfo *eqfunctions);
|
||||
FmgrInfo *eqfunctions);
|
||||
static bool slotAllNulls(TupleTableSlot *slot);
|
||||
static bool slotNoNulls(TupleTableSlot *slot);
|
||||
|
||||
|
@ -158,43 +158,43 @@ typedef struct WindowStatePerAggData
|
||||
} WindowStatePerAggData;
|
||||
|
||||
static void initialize_windowaggregate(WindowAggState *winstate,
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate);
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate);
|
||||
static void advance_windowaggregate(WindowAggState *winstate,
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate);
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate);
|
||||
static bool advance_windowaggregate_base(WindowAggState *winstate,
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate);
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate);
|
||||
static void finalize_windowaggregate(WindowAggState *winstate,
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate,
|
||||
Datum *result, bool *isnull);
|
||||
WindowStatePerFunc perfuncstate,
|
||||
WindowStatePerAgg peraggstate,
|
||||
Datum *result, bool *isnull);
|
||||
|
||||
static void eval_windowaggregates(WindowAggState *winstate);
|
||||
static void eval_windowfunction(WindowAggState *winstate,
|
||||
WindowStatePerFunc perfuncstate,
|
||||
Datum *result, bool *isnull);
|
||||
WindowStatePerFunc perfuncstate,
|
||||
Datum *result, bool *isnull);
|
||||
|
||||
static void begin_partition(WindowAggState *winstate);
|
||||
static void spool_tuples(WindowAggState *winstate, int64 pos);
|
||||
static void release_partition(WindowAggState *winstate);
|
||||
|
||||
static int row_is_in_frame(WindowAggState *winstate, int64 pos,
|
||||
TupleTableSlot *slot);
|
||||
static int row_is_in_frame(WindowAggState *winstate, int64 pos,
|
||||
TupleTableSlot *slot);
|
||||
static void update_frameheadpos(WindowAggState *winstate);
|
||||
static void update_frametailpos(WindowAggState *winstate);
|
||||
static void update_grouptailpos(WindowAggState *winstate);
|
||||
|
||||
static WindowStatePerAggData *initialize_peragg(WindowAggState *winstate,
|
||||
WindowFunc *wfunc,
|
||||
WindowStatePerAgg peraggstate);
|
||||
WindowFunc *wfunc,
|
||||
WindowStatePerAgg peraggstate);
|
||||
static Datum GetAggInitVal(Datum textInitVal, Oid transtype);
|
||||
|
||||
static bool are_peers(WindowAggState *winstate, TupleTableSlot *slot1,
|
||||
TupleTableSlot *slot2);
|
||||
TupleTableSlot *slot2);
|
||||
static bool window_gettupleslot(WindowObject winobj, int64 pos,
|
||||
TupleTableSlot *slot);
|
||||
TupleTableSlot *slot);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -52,26 +52,26 @@ static int _SPI_stack_depth = 0; /* allocated size of _SPI_stack */
|
||||
static int _SPI_connected = -1; /* current stack index */
|
||||
|
||||
static Portal SPI_cursor_open_internal(const char *name, SPIPlanPtr plan,
|
||||
ParamListInfo paramLI, bool read_only);
|
||||
ParamListInfo paramLI, bool read_only);
|
||||
|
||||
static void _SPI_prepare_plan(const char *src, SPIPlanPtr plan);
|
||||
|
||||
static void _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan);
|
||||
|
||||
static int _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
|
||||
Snapshot snapshot, Snapshot crosscheck_snapshot,
|
||||
bool read_only, bool fire_triggers, uint64 tcount);
|
||||
static int _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
|
||||
Snapshot snapshot, Snapshot crosscheck_snapshot,
|
||||
bool read_only, bool fire_triggers, uint64 tcount);
|
||||
|
||||
static ParamListInfo _SPI_convert_params(int nargs, Oid *argtypes,
|
||||
Datum *Values, const char *Nulls);
|
||||
Datum *Values, const char *Nulls);
|
||||
|
||||
static int _SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, uint64 tcount);
|
||||
|
||||
static void _SPI_error_callback(void *arg);
|
||||
|
||||
static void _SPI_cursor_operation(Portal portal,
|
||||
FetchDirection direction, long count,
|
||||
DestReceiver *dest);
|
||||
FetchDirection direction, long count,
|
||||
DestReceiver *dest);
|
||||
|
||||
static SPIPlanPtr _SPI_make_plan_non_temp(SPIPlanPtr plan);
|
||||
static SPIPlanPtr _SPI_save_plan(SPIPlanPtr plan);
|
||||
|
Reference in New Issue
Block a user