mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Add const to values and nulls arguments
This excludes any changes that would change the external AM APIs. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://www.postgresql.org/message-id/flat/14c31f4a-0347-0805-dce8-93a9072c05a5%40eisentraut.org
This commit is contained in:
parent
fc4089f3c6
commit
1d91d24d9a
@ -80,7 +80,7 @@ static void union_tuples(BrinDesc *bdesc, BrinMemTuple *a,
|
|||||||
BrinTuple *b);
|
BrinTuple *b);
|
||||||
static void brin_vacuum_scan(Relation idxrel, BufferAccessStrategy strategy);
|
static void brin_vacuum_scan(Relation idxrel, BufferAccessStrategy strategy);
|
||||||
static bool add_values_to_range(Relation idxRel, BrinDesc *bdesc,
|
static bool add_values_to_range(Relation idxRel, BrinDesc *bdesc,
|
||||||
BrinMemTuple *dtup, Datum *values, bool *nulls);
|
BrinMemTuple *dtup, const Datum *values, const bool *nulls);
|
||||||
static bool check_null_keys(BrinValues *bval, ScanKey *nullkeys, int nnullkeys);
|
static bool check_null_keys(BrinValues *bval, ScanKey *nullkeys, int nnullkeys);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1774,7 +1774,7 @@ brin_vacuum_scan(Relation idxrel, BufferAccessStrategy strategy)
|
|||||||
|
|
||||||
static bool
|
static bool
|
||||||
add_values_to_range(Relation idxRel, BrinDesc *bdesc, BrinMemTuple *dtup,
|
add_values_to_range(Relation idxRel, BrinDesc *bdesc, BrinMemTuple *dtup,
|
||||||
Datum *values, bool *nulls)
|
const Datum *values, const bool *nulls)
|
||||||
{
|
{
|
||||||
int keyno;
|
int keyno;
|
||||||
|
|
||||||
|
@ -205,8 +205,8 @@ getmissingattr(TupleDesc tupleDesc,
|
|||||||
*/
|
*/
|
||||||
Size
|
Size
|
||||||
heap_compute_data_size(TupleDesc tupleDesc,
|
heap_compute_data_size(TupleDesc tupleDesc,
|
||||||
Datum *values,
|
const Datum *values,
|
||||||
bool *isnull)
|
const bool *isnull)
|
||||||
{
|
{
|
||||||
Size data_length = 0;
|
Size data_length = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -390,7 +390,7 @@ fill_val(Form_pg_attribute att,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
heap_fill_tuple(TupleDesc tupleDesc,
|
heap_fill_tuple(TupleDesc tupleDesc,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
char *data, Size data_size,
|
char *data, Size data_size,
|
||||||
uint16 *infomask, bits8 *bit)
|
uint16 *infomask, bits8 *bit)
|
||||||
{
|
{
|
||||||
@ -1106,8 +1106,8 @@ heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc)
|
|||||||
*/
|
*/
|
||||||
HeapTuple
|
HeapTuple
|
||||||
heap_form_tuple(TupleDesc tupleDescriptor,
|
heap_form_tuple(TupleDesc tupleDescriptor,
|
||||||
Datum *values,
|
const Datum *values,
|
||||||
bool *isnull)
|
const bool *isnull)
|
||||||
{
|
{
|
||||||
HeapTuple tuple; /* return tuple */
|
HeapTuple tuple; /* return tuple */
|
||||||
HeapTupleHeader td; /* tuple data */
|
HeapTupleHeader td; /* tuple data */
|
||||||
@ -1200,9 +1200,9 @@ heap_form_tuple(TupleDesc tupleDescriptor,
|
|||||||
HeapTuple
|
HeapTuple
|
||||||
heap_modify_tuple(HeapTuple tuple,
|
heap_modify_tuple(HeapTuple tuple,
|
||||||
TupleDesc tupleDesc,
|
TupleDesc tupleDesc,
|
||||||
Datum *replValues,
|
const Datum *replValues,
|
||||||
bool *replIsnull,
|
const bool *replIsnull,
|
||||||
bool *doReplace)
|
const bool *doReplace)
|
||||||
{
|
{
|
||||||
int numberOfAttributes = tupleDesc->natts;
|
int numberOfAttributes = tupleDesc->natts;
|
||||||
int attoff;
|
int attoff;
|
||||||
@ -1269,9 +1269,9 @@ HeapTuple
|
|||||||
heap_modify_tuple_by_cols(HeapTuple tuple,
|
heap_modify_tuple_by_cols(HeapTuple tuple,
|
||||||
TupleDesc tupleDesc,
|
TupleDesc tupleDesc,
|
||||||
int nCols,
|
int nCols,
|
||||||
int *replCols,
|
const int *replCols,
|
||||||
Datum *replValues,
|
const Datum *replValues,
|
||||||
bool *replIsnull)
|
const bool *replIsnull)
|
||||||
{
|
{
|
||||||
int numberOfAttributes = tupleDesc->natts;
|
int numberOfAttributes = tupleDesc->natts;
|
||||||
Datum *values;
|
Datum *values;
|
||||||
@ -1442,8 +1442,8 @@ heap_freetuple(HeapTuple htup)
|
|||||||
*/
|
*/
|
||||||
MinimalTuple
|
MinimalTuple
|
||||||
heap_form_minimal_tuple(TupleDesc tupleDescriptor,
|
heap_form_minimal_tuple(TupleDesc tupleDescriptor,
|
||||||
Datum *values,
|
const Datum *values,
|
||||||
bool *isnull)
|
const bool *isnull)
|
||||||
{
|
{
|
||||||
MinimalTuple tuple; /* return tuple */
|
MinimalTuple tuple; /* return tuple */
|
||||||
Size len,
|
Size len,
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
*/
|
*/
|
||||||
IndexTuple
|
IndexTuple
|
||||||
index_form_tuple(TupleDesc tupleDescriptor,
|
index_form_tuple(TupleDesc tupleDescriptor,
|
||||||
Datum *values,
|
const Datum *values,
|
||||||
bool *isnull)
|
const bool *isnull)
|
||||||
{
|
{
|
||||||
return index_form_tuple_context(tupleDescriptor, values, isnull,
|
return index_form_tuple_context(tupleDescriptor, values, isnull,
|
||||||
CurrentMemoryContext);
|
CurrentMemoryContext);
|
||||||
@ -63,8 +63,8 @@ index_form_tuple(TupleDesc tupleDescriptor,
|
|||||||
*/
|
*/
|
||||||
IndexTuple
|
IndexTuple
|
||||||
index_form_tuple_context(TupleDesc tupleDescriptor,
|
index_form_tuple_context(TupleDesc tupleDescriptor,
|
||||||
Datum *values,
|
const Datum *values,
|
||||||
bool *isnull,
|
const bool *isnull,
|
||||||
MemoryContext context)
|
MemoryContext context)
|
||||||
{
|
{
|
||||||
char *tp; /* tuple pointer */
|
char *tp; /* tuple pointer */
|
||||||
@ -79,8 +79,8 @@ index_form_tuple_context(TupleDesc tupleDescriptor,
|
|||||||
int numberOfAttributes = tupleDescriptor->natts;
|
int numberOfAttributes = tupleDescriptor->natts;
|
||||||
|
|
||||||
#ifdef TOAST_INDEX_HACK
|
#ifdef TOAST_INDEX_HACK
|
||||||
Datum untoasted_values[INDEX_MAX_KEYS];
|
Datum untoasted_values[INDEX_MAX_KEYS] = {0};
|
||||||
bool untoasted_free[INDEX_MAX_KEYS];
|
bool untoasted_free[INDEX_MAX_KEYS] = {0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (numberOfAttributes > INDEX_MAX_KEYS)
|
if (numberOfAttributes > INDEX_MAX_KEYS)
|
||||||
|
@ -573,7 +573,7 @@ gistdentryinit(GISTSTATE *giststate, int nkey, GISTENTRY *e,
|
|||||||
|
|
||||||
IndexTuple
|
IndexTuple
|
||||||
gistFormTuple(GISTSTATE *giststate, Relation r,
|
gistFormTuple(GISTSTATE *giststate, Relation r,
|
||||||
Datum *attdata, bool *isnull, bool isleaf)
|
const Datum *attdata, const bool *isnull, bool isleaf)
|
||||||
{
|
{
|
||||||
Datum compatt[INDEX_MAX_KEYS];
|
Datum compatt[INDEX_MAX_KEYS];
|
||||||
IndexTuple res;
|
IndexTuple res;
|
||||||
@ -594,7 +594,7 @@ gistFormTuple(GISTSTATE *giststate, Relation r,
|
|||||||
|
|
||||||
void
|
void
|
||||||
gistCompressValues(GISTSTATE *giststate, Relation r,
|
gistCompressValues(GISTSTATE *giststate, Relation r,
|
||||||
Datum *attdata, bool *isnull, bool isleaf, Datum *compatt)
|
const Datum *attdata, const bool *isnull, bool isleaf, Datum *compatt)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ _h_spooldestroy(HSpool *hspool)
|
|||||||
* spool an index entry into the sort file.
|
* spool an index entry into the sort file.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_h_spool(HSpool *hspool, ItemPointer self, Datum *values, bool *isnull)
|
_h_spool(HSpool *hspool, ItemPointer self, const Datum *values, const bool *isnull)
|
||||||
{
|
{
|
||||||
tuplesort_putindextuplevalues(hspool->sortstate, hspool->index,
|
tuplesort_putindextuplevalues(hspool->sortstate, hspool->index,
|
||||||
self, values, isnull);
|
self, values, isnull);
|
||||||
|
@ -175,7 +175,7 @@ IndexScanEnd(IndexScanDesc scan)
|
|||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
BuildIndexValueDescription(Relation indexRelation,
|
BuildIndexValueDescription(Relation indexRelation,
|
||||||
Datum *values, bool *isnull)
|
const Datum *values, const bool *isnull)
|
||||||
{
|
{
|
||||||
StringInfoData buf;
|
StringInfoData buf;
|
||||||
Form_pg_index idxrec;
|
Form_pg_index idxrec;
|
||||||
|
@ -788,7 +788,7 @@ memcpyInnerDatum(void *target, SpGistTypeDesc *att, Datum datum)
|
|||||||
*/
|
*/
|
||||||
Size
|
Size
|
||||||
SpGistGetLeafTupleSize(TupleDesc tupleDescriptor,
|
SpGistGetLeafTupleSize(TupleDesc tupleDescriptor,
|
||||||
Datum *datums, bool *isnulls)
|
const Datum *datums, const bool *isnulls)
|
||||||
{
|
{
|
||||||
Size size;
|
Size size;
|
||||||
Size data_size;
|
Size data_size;
|
||||||
@ -841,7 +841,7 @@ SpGistGetLeafTupleSize(TupleDesc tupleDescriptor,
|
|||||||
*/
|
*/
|
||||||
SpGistLeafTuple
|
SpGistLeafTuple
|
||||||
spgFormLeafTuple(SpGistState *state, ItemPointer heapPtr,
|
spgFormLeafTuple(SpGistState *state, ItemPointer heapPtr,
|
||||||
Datum *datums, bool *isnulls)
|
const Datum *datums, const bool *isnulls)
|
||||||
{
|
{
|
||||||
SpGistLeafTuple tup;
|
SpGistLeafTuple tup;
|
||||||
TupleDesc tupleDescriptor = state->leafTupDesc;
|
TupleDesc tupleDescriptor = state->leafTupDesc;
|
||||||
|
@ -316,7 +316,7 @@ toast_tuple_cleanup(ToastTupleContext *ttc)
|
|||||||
* relation.
|
* relation.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
toast_delete_external(Relation rel, Datum *values, bool *isnull,
|
toast_delete_external(Relation rel, const Datum *values, const bool *isnull,
|
||||||
bool is_speculative)
|
bool is_speculative)
|
||||||
{
|
{
|
||||||
TupleDesc tupleDesc = rel->rd_att;
|
TupleDesc tupleDesc = rel->rd_att;
|
||||||
|
@ -127,15 +127,15 @@ typedef enum
|
|||||||
static bool check_exclusion_or_unique_constraint(Relation heap, Relation index,
|
static bool check_exclusion_or_unique_constraint(Relation heap, Relation index,
|
||||||
IndexInfo *indexInfo,
|
IndexInfo *indexInfo,
|
||||||
ItemPointer tupleid,
|
ItemPointer tupleid,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
EState *estate, bool newIndex,
|
EState *estate, bool newIndex,
|
||||||
CEOUC_WAIT_MODE waitMode,
|
CEOUC_WAIT_MODE waitMode,
|
||||||
bool violationOK,
|
bool violationOK,
|
||||||
ItemPointer conflictTid);
|
ItemPointer conflictTid);
|
||||||
|
|
||||||
static bool index_recheck_constraint(Relation index, Oid *constr_procs,
|
static bool index_recheck_constraint(Relation index, const Oid *constr_procs,
|
||||||
Datum *existing_values, bool *existing_isnull,
|
const Datum *existing_values, const bool *existing_isnull,
|
||||||
Datum *new_values);
|
const Datum *new_values);
|
||||||
static bool index_unchanged_by_update(ResultRelInfo *resultRelInfo,
|
static bool index_unchanged_by_update(ResultRelInfo *resultRelInfo,
|
||||||
EState *estate, IndexInfo *indexInfo,
|
EState *estate, IndexInfo *indexInfo,
|
||||||
Relation indexRelation);
|
Relation indexRelation);
|
||||||
@ -684,7 +684,7 @@ static bool
|
|||||||
check_exclusion_or_unique_constraint(Relation heap, Relation index,
|
check_exclusion_or_unique_constraint(Relation heap, Relation index,
|
||||||
IndexInfo *indexInfo,
|
IndexInfo *indexInfo,
|
||||||
ItemPointer tupleid,
|
ItemPointer tupleid,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
EState *estate, bool newIndex,
|
EState *estate, bool newIndex,
|
||||||
CEOUC_WAIT_MODE waitMode,
|
CEOUC_WAIT_MODE waitMode,
|
||||||
bool violationOK,
|
bool violationOK,
|
||||||
@ -910,7 +910,7 @@ void
|
|||||||
check_exclusion_constraint(Relation heap, Relation index,
|
check_exclusion_constraint(Relation heap, Relation index,
|
||||||
IndexInfo *indexInfo,
|
IndexInfo *indexInfo,
|
||||||
ItemPointer tupleid,
|
ItemPointer tupleid,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
EState *estate, bool newIndex)
|
EState *estate, bool newIndex)
|
||||||
{
|
{
|
||||||
(void) check_exclusion_or_unique_constraint(heap, index, indexInfo, tupleid,
|
(void) check_exclusion_or_unique_constraint(heap, index, indexInfo, tupleid,
|
||||||
@ -924,9 +924,9 @@ check_exclusion_constraint(Relation heap, Relation index,
|
|||||||
* exclusion condition against the new_values. Returns true if conflict.
|
* exclusion condition against the new_values. Returns true if conflict.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
index_recheck_constraint(Relation index, Oid *constr_procs,
|
index_recheck_constraint(Relation index, const Oid *constr_procs,
|
||||||
Datum *existing_values, bool *existing_isnull,
|
const Datum *existing_values, const bool *existing_isnull,
|
||||||
Datum *new_values)
|
const Datum *new_values)
|
||||||
{
|
{
|
||||||
int indnkeyatts = IndexRelationGetNumberOfKeyAttributes(index);
|
int indnkeyatts = IndexRelationGetNumberOfKeyAttributes(index);
|
||||||
int i;
|
int i;
|
||||||
|
@ -2273,7 +2273,7 @@ begin_tup_output_tupdesc(DestReceiver *dest,
|
|||||||
* write a single tuple
|
* write a single tuple
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull)
|
do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull)
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = tstate->slot;
|
TupleTableSlot *slot = tstate->slot;
|
||||||
int natts = slot->tts_tupleDescriptor->natts;
|
int natts = slot->tts_tupleDescriptor->natts;
|
||||||
|
@ -4720,8 +4720,8 @@ get_range_nulltest(PartitionKey key)
|
|||||||
* Compute the hash value for given partition key values.
|
* Compute the hash value for given partition key values.
|
||||||
*/
|
*/
|
||||||
uint64
|
uint64
|
||||||
compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc, Oid *partcollation,
|
compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc, const Oid *partcollation,
|
||||||
Datum *values, bool *isnull)
|
const Datum *values, const bool *isnull)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint64 rowHash = 0;
|
uint64 rowHash = 0;
|
||||||
|
@ -1182,7 +1182,7 @@ catenate_stringinfo_string(StringInfo buffer, const char *addon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Datum
|
Datum
|
||||||
json_build_object_worker(int nargs, Datum *args, bool *nulls, Oid *types,
|
json_build_object_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types,
|
||||||
bool absent_on_null, bool unique_keys)
|
bool absent_on_null, bool unique_keys)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -1295,7 +1295,7 @@ json_build_object_noargs(PG_FUNCTION_ARGS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Datum
|
Datum
|
||||||
json_build_array_worker(int nargs, Datum *args, bool *nulls, Oid *types,
|
json_build_array_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types,
|
||||||
bool absent_on_null)
|
bool absent_on_null)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -58,7 +58,7 @@ static void jsonb_put_escaped_value(StringInfo out, JsonbValue *scalarVal);
|
|||||||
static JsonParseErrorType jsonb_in_scalar(void *pstate, char *token, JsonTokenType tokentype);
|
static JsonParseErrorType jsonb_in_scalar(void *pstate, char *token, JsonTokenType tokentype);
|
||||||
static void composite_to_jsonb(Datum composite, JsonbInState *result);
|
static void composite_to_jsonb(Datum composite, JsonbInState *result);
|
||||||
static void array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims,
|
static void array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims,
|
||||||
Datum *vals, bool *nulls, int *valcount,
|
const Datum *vals, const bool *nulls, int *valcount,
|
||||||
JsonTypeCategory tcategory, Oid outfuncoid);
|
JsonTypeCategory tcategory, Oid outfuncoid);
|
||||||
static void array_to_jsonb_internal(Datum array, JsonbInState *result);
|
static void array_to_jsonb_internal(Datum array, JsonbInState *result);
|
||||||
static void datum_to_jsonb_internal(Datum val, bool is_null, JsonbInState *result,
|
static void datum_to_jsonb_internal(Datum val, bool is_null, JsonbInState *result,
|
||||||
@ -864,8 +864,8 @@ datum_to_jsonb_internal(Datum val, bool is_null, JsonbInState *result,
|
|||||||
* ourselves recursively to process the next dimension.
|
* ourselves recursively to process the next dimension.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims, Datum *vals,
|
array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims, const Datum *vals,
|
||||||
bool *nulls, int *valcount, JsonTypeCategory tcategory,
|
const bool *nulls, int *valcount, JsonTypeCategory tcategory,
|
||||||
Oid outfuncoid)
|
Oid outfuncoid)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -1127,7 +1127,7 @@ datum_to_jsonb(Datum val, JsonTypeCategory tcategory, Oid outfuncoid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Datum
|
Datum
|
||||||
jsonb_build_object_worker(int nargs, Datum *args, bool *nulls, Oid *types,
|
jsonb_build_object_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types,
|
||||||
bool absent_on_null, bool unique_keys)
|
bool absent_on_null, bool unique_keys)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -1212,7 +1212,7 @@ jsonb_build_object_noargs(PG_FUNCTION_ARGS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Datum
|
Datum
|
||||||
jsonb_build_array_worker(int nargs, Datum *args, bool *nulls, Oid *types,
|
jsonb_build_array_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types,
|
||||||
bool absent_on_null)
|
bool absent_on_null)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -683,8 +683,8 @@ tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tuplesort_putindextuplevalues(Tuplesortstate *state, Relation rel,
|
tuplesort_putindextuplevalues(Tuplesortstate *state, Relation rel,
|
||||||
ItemPointer self, Datum *values,
|
ItemPointer self, const Datum *values,
|
||||||
bool *isnull)
|
const bool *isnull)
|
||||||
{
|
{
|
||||||
SortTuple stup;
|
SortTuple stup;
|
||||||
IndexTuple tuple;
|
IndexTuple tuple;
|
||||||
|
@ -748,7 +748,7 @@ tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
|
tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
|
||||||
Datum *values, bool *isnull)
|
const Datum *values, const bool *isnull)
|
||||||
{
|
{
|
||||||
MinimalTuple tuple;
|
MinimalTuple tuple;
|
||||||
MemoryContext oldcxt = MemoryContextSwitchTo(state->context);
|
MemoryContext oldcxt = MemoryContextSwitchTo(state->context);
|
||||||
|
@ -204,7 +204,7 @@ extern IndexScanDesc RelationGetIndexScan(Relation indexRelation,
|
|||||||
int nkeys, int norderbys);
|
int nkeys, int norderbys);
|
||||||
extern void IndexScanEnd(IndexScanDesc scan);
|
extern void IndexScanEnd(IndexScanDesc scan);
|
||||||
extern char *BuildIndexValueDescription(Relation indexRelation,
|
extern char *BuildIndexValueDescription(Relation indexRelation,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern TransactionId index_compute_xid_horizon_for_tuples(Relation irel,
|
extern TransactionId index_compute_xid_horizon_for_tuples(Relation irel,
|
||||||
Relation hrel,
|
Relation hrel,
|
||||||
Buffer ibuf,
|
Buffer ibuf,
|
||||||
|
@ -502,9 +502,9 @@ extern IndexTuple gistgetadjusted(Relation r,
|
|||||||
IndexTuple addtup,
|
IndexTuple addtup,
|
||||||
GISTSTATE *giststate);
|
GISTSTATE *giststate);
|
||||||
extern IndexTuple gistFormTuple(GISTSTATE *giststate,
|
extern IndexTuple gistFormTuple(GISTSTATE *giststate,
|
||||||
Relation r, Datum *attdata, bool *isnull, bool isleaf);
|
Relation r, const Datum *attdata, const bool *isnull, bool isleaf);
|
||||||
extern void gistCompressValues(GISTSTATE *giststate, Relation r,
|
extern void gistCompressValues(GISTSTATE *giststate, Relation r,
|
||||||
Datum *attdata, bool *isnull, bool isleaf, Datum *compatt);
|
const Datum *attdata, const bool *isnull, bool isleaf, Datum *compatt);
|
||||||
|
|
||||||
extern OffsetNumber gistchoose(Relation r, Page p,
|
extern OffsetNumber gistchoose(Relation r, Page p,
|
||||||
IndexTuple it,
|
IndexTuple it,
|
||||||
|
@ -451,7 +451,7 @@ typedef struct HSpool HSpool; /* opaque struct in hashsort.c */
|
|||||||
extern HSpool *_h_spoolinit(Relation heap, Relation index, uint32 num_buckets);
|
extern HSpool *_h_spoolinit(Relation heap, Relation index, uint32 num_buckets);
|
||||||
extern void _h_spooldestroy(HSpool *hspool);
|
extern void _h_spooldestroy(HSpool *hspool);
|
||||||
extern void _h_spool(HSpool *hspool, ItemPointer self,
|
extern void _h_spool(HSpool *hspool, ItemPointer self,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern void _h_indexbuild(HSpool *hspool, Relation heapRel);
|
extern void _h_indexbuild(HSpool *hspool, Relation heapRel);
|
||||||
|
|
||||||
/* hashutil.c */
|
/* hashutil.c */
|
||||||
|
@ -696,9 +696,9 @@ struct MinimalTupleData
|
|||||||
|
|
||||||
/* prototypes for functions in common/heaptuple.c */
|
/* prototypes for functions in common/heaptuple.c */
|
||||||
extern Size heap_compute_data_size(TupleDesc tupleDesc,
|
extern Size heap_compute_data_size(TupleDesc tupleDesc,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern void heap_fill_tuple(TupleDesc tupleDesc,
|
extern void heap_fill_tuple(TupleDesc tupleDesc,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
char *data, Size data_size,
|
char *data, Size data_size,
|
||||||
uint16 *infomask, bits8 *bit);
|
uint16 *infomask, bits8 *bit);
|
||||||
extern bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc);
|
extern bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc);
|
||||||
@ -712,23 +712,23 @@ extern HeapTuple heap_copytuple(HeapTuple tuple);
|
|||||||
extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
|
extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
|
||||||
extern Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc);
|
extern Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc);
|
||||||
extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor,
|
extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern HeapTuple heap_modify_tuple(HeapTuple tuple,
|
extern HeapTuple heap_modify_tuple(HeapTuple tuple,
|
||||||
TupleDesc tupleDesc,
|
TupleDesc tupleDesc,
|
||||||
Datum *replValues,
|
const Datum *replValues,
|
||||||
bool *replIsnull,
|
const bool *replIsnull,
|
||||||
bool *doReplace);
|
const bool *doReplace);
|
||||||
extern HeapTuple heap_modify_tuple_by_cols(HeapTuple tuple,
|
extern HeapTuple heap_modify_tuple_by_cols(HeapTuple tuple,
|
||||||
TupleDesc tupleDesc,
|
TupleDesc tupleDesc,
|
||||||
int nCols,
|
int nCols,
|
||||||
int *replCols,
|
const int *replCols,
|
||||||
Datum *replValues,
|
const Datum *replValues,
|
||||||
bool *replIsnull);
|
const bool *replIsnull);
|
||||||
extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
|
extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
|
||||||
Datum *values, bool *isnull);
|
Datum *values, bool *isnull);
|
||||||
extern void heap_freetuple(HeapTuple htup);
|
extern void heap_freetuple(HeapTuple htup);
|
||||||
extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor,
|
extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern void heap_free_minimal_tuple(MinimalTuple mtup);
|
extern void heap_free_minimal_tuple(MinimalTuple mtup);
|
||||||
extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
|
extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
|
||||||
extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
|
extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
|
||||||
|
@ -75,9 +75,9 @@ typedef IndexAttributeBitMapData * IndexAttributeBitMap;
|
|||||||
|
|
||||||
/* routines in indextuple.c */
|
/* routines in indextuple.c */
|
||||||
extern IndexTuple index_form_tuple(TupleDesc tupleDescriptor,
|
extern IndexTuple index_form_tuple(TupleDesc tupleDescriptor,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern IndexTuple index_form_tuple_context(TupleDesc tupleDescriptor,
|
extern IndexTuple index_form_tuple_context(TupleDesc tupleDescriptor,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
MemoryContext context);
|
MemoryContext context);
|
||||||
extern Datum nocache_index_getattr(IndexTuple tup, int attnum,
|
extern Datum nocache_index_getattr(IndexTuple tup, int attnum,
|
||||||
TupleDesc tupleDesc);
|
TupleDesc tupleDesc);
|
||||||
|
@ -506,10 +506,10 @@ extern void SpGistInitBuffer(Buffer b, uint16 f);
|
|||||||
extern void SpGistInitMetapage(Page page);
|
extern void SpGistInitMetapage(Page page);
|
||||||
extern unsigned int SpGistGetInnerTypeSize(SpGistTypeDesc *att, Datum datum);
|
extern unsigned int SpGistGetInnerTypeSize(SpGistTypeDesc *att, Datum datum);
|
||||||
extern Size SpGistGetLeafTupleSize(TupleDesc tupleDescriptor,
|
extern Size SpGistGetLeafTupleSize(TupleDesc tupleDescriptor,
|
||||||
Datum *datums, bool *isnulls);
|
const Datum *datums, const bool *isnulls);
|
||||||
extern SpGistLeafTuple spgFormLeafTuple(SpGistState *state,
|
extern SpGistLeafTuple spgFormLeafTuple(SpGistState *state,
|
||||||
ItemPointer heapPtr,
|
ItemPointer heapPtr,
|
||||||
Datum *datums, bool *isnulls);
|
const Datum *datums, const bool *isnulls);
|
||||||
extern SpGistNodeTuple spgFormNodeTuple(SpGistState *state,
|
extern SpGistNodeTuple spgFormNodeTuple(SpGistState *state,
|
||||||
Datum label, bool isnull);
|
Datum label, bool isnull);
|
||||||
extern SpGistInnerTuple spgFormInnerTuple(SpGistState *state,
|
extern SpGistInnerTuple spgFormInnerTuple(SpGistState *state,
|
||||||
|
@ -110,7 +110,7 @@ extern void toast_tuple_externalize(ToastTupleContext *ttc, int attribute,
|
|||||||
int options);
|
int options);
|
||||||
extern void toast_tuple_cleanup(ToastTupleContext *ttc);
|
extern void toast_tuple_cleanup(ToastTupleContext *ttc);
|
||||||
|
|
||||||
extern void toast_delete_external(Relation rel, Datum *values, bool *isnull,
|
extern void toast_delete_external(Relation rel, const Datum *values, const bool *isnull,
|
||||||
bool is_speculative);
|
bool is_speculative);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -509,7 +509,7 @@ typedef struct TupOutputState
|
|||||||
extern TupOutputState *begin_tup_output_tupdesc(DestReceiver *dest,
|
extern TupOutputState *begin_tup_output_tupdesc(DestReceiver *dest,
|
||||||
TupleDesc tupdesc,
|
TupleDesc tupdesc,
|
||||||
const TupleTableSlotOps *tts_ops);
|
const TupleTableSlotOps *tts_ops);
|
||||||
extern void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull);
|
extern void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull);
|
||||||
extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
|
extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
|
||||||
extern void end_tup_output(TupOutputState *tstate);
|
extern void end_tup_output(TupOutputState *tstate);
|
||||||
|
|
||||||
@ -639,7 +639,7 @@ extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
|
|||||||
extern void check_exclusion_constraint(Relation heap, Relation index,
|
extern void check_exclusion_constraint(Relation heap, Relation index,
|
||||||
IndexInfo *indexInfo,
|
IndexInfo *indexInfo,
|
||||||
ItemPointer tupleid,
|
ItemPointer tupleid,
|
||||||
Datum *values, bool *isnull,
|
const Datum *values, const bool *isnull,
|
||||||
EState *estate, bool newIndex);
|
EState *estate, bool newIndex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -100,8 +100,8 @@ typedef struct PartitionBoundInfoData
|
|||||||
|
|
||||||
extern int get_hash_partition_greatest_modulus(PartitionBoundInfo bound);
|
extern int get_hash_partition_greatest_modulus(PartitionBoundInfo bound);
|
||||||
extern uint64 compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc,
|
extern uint64 compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc,
|
||||||
Oid *partcollation,
|
const Oid *partcollation,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern List *get_qual_from_partbound(Relation parent,
|
extern List *get_qual_from_partbound(Relation parent,
|
||||||
PartitionBoundSpec *spec);
|
PartitionBoundSpec *spec);
|
||||||
extern PartitionBoundInfo partition_bounds_create(PartitionBoundSpec **boundspecs,
|
extern PartitionBoundInfo partition_bounds_create(PartitionBoundSpec **boundspecs,
|
||||||
|
@ -21,11 +21,11 @@ extern void escape_json(StringInfo buf, const char *str);
|
|||||||
extern char *JsonEncodeDateTime(char *buf, Datum value, Oid typid,
|
extern char *JsonEncodeDateTime(char *buf, Datum value, Oid typid,
|
||||||
const int *tzp);
|
const int *tzp);
|
||||||
extern bool to_json_is_immutable(Oid typoid);
|
extern bool to_json_is_immutable(Oid typoid);
|
||||||
extern Datum json_build_object_worker(int nargs, Datum *args, bool *nulls,
|
extern Datum json_build_object_worker(int nargs, const Datum *args, const bool *nulls,
|
||||||
Oid *types, bool absent_on_null,
|
const Oid *types, bool absent_on_null,
|
||||||
bool unique_keys);
|
bool unique_keys);
|
||||||
extern Datum json_build_array_worker(int nargs, Datum *args, bool *nulls,
|
extern Datum json_build_array_worker(int nargs, const Datum *args, const bool *nulls,
|
||||||
Oid *types, bool absent_on_null);
|
const Oid *types, bool absent_on_null);
|
||||||
extern bool json_validate(text *json, bool check_unique_keys, bool throw_error);
|
extern bool json_validate(text *json, bool check_unique_keys, bool throw_error);
|
||||||
|
|
||||||
#endif /* JSON_H */
|
#endif /* JSON_H */
|
||||||
|
@ -430,10 +430,10 @@ extern Datum jsonb_set_element(Jsonb *jb, Datum *path, int path_len,
|
|||||||
extern Datum jsonb_get_element(Jsonb *jb, Datum *path, int npath,
|
extern Datum jsonb_get_element(Jsonb *jb, Datum *path, int npath,
|
||||||
bool *isnull, bool as_text);
|
bool *isnull, bool as_text);
|
||||||
extern bool to_jsonb_is_immutable(Oid typoid);
|
extern bool to_jsonb_is_immutable(Oid typoid);
|
||||||
extern Datum jsonb_build_object_worker(int nargs, Datum *args, bool *nulls,
|
extern Datum jsonb_build_object_worker(int nargs, const Datum *args, const bool *nulls,
|
||||||
Oid *types, bool absent_on_null,
|
const Oid *types, bool absent_on_null,
|
||||||
bool unique_keys);
|
bool unique_keys);
|
||||||
extern Datum jsonb_build_array_worker(int nargs, Datum *args, bool *nulls,
|
extern Datum jsonb_build_array_worker(int nargs, const Datum *args, const bool *nulls,
|
||||||
Oid *types, bool absent_on_null);
|
const Oid *types, bool absent_on_null);
|
||||||
|
|
||||||
#endif /* __JSONB_H__ */
|
#endif /* __JSONB_H__ */
|
||||||
|
@ -437,7 +437,7 @@ extern void tuplesort_puttupleslot(Tuplesortstate *state,
|
|||||||
extern void tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup);
|
extern void tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup);
|
||||||
extern void tuplesort_putindextuplevalues(Tuplesortstate *state,
|
extern void tuplesort_putindextuplevalues(Tuplesortstate *state,
|
||||||
Relation rel, ItemPointer self,
|
Relation rel, ItemPointer self,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
extern void tuplesort_putdatum(Tuplesortstate *state, Datum val,
|
extern void tuplesort_putdatum(Tuplesortstate *state, Datum val,
|
||||||
bool isNull);
|
bool isNull);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ extern void tuplestore_puttupleslot(Tuplestorestate *state,
|
|||||||
TupleTableSlot *slot);
|
TupleTableSlot *slot);
|
||||||
extern void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple);
|
extern void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple);
|
||||||
extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
|
extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
|
||||||
Datum *values, bool *isnull);
|
const Datum *values, const bool *isnull);
|
||||||
|
|
||||||
/* Backwards compatibility macro */
|
/* Backwards compatibility macro */
|
||||||
#define tuplestore_donestoring(state) ((void) 0)
|
#define tuplestore_donestoring(state) ((void) 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user