mirror of
https://github.com/postgres/postgres.git
synced 2025-09-11 00:12:06 +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:
@@ -204,7 +204,7 @@ extern IndexScanDesc RelationGetIndexScan(Relation indexRelation,
|
||||
int nkeys, int norderbys);
|
||||
extern void IndexScanEnd(IndexScanDesc scan);
|
||||
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,
|
||||
Relation hrel,
|
||||
Buffer ibuf,
|
||||
|
@@ -502,9 +502,9 @@ extern IndexTuple gistgetadjusted(Relation r,
|
||||
IndexTuple addtup,
|
||||
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,
|
||||
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,
|
||||
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 void _h_spooldestroy(HSpool *hspool);
|
||||
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);
|
||||
|
||||
/* hashutil.c */
|
||||
|
@@ -696,9 +696,9 @@ struct MinimalTupleData
|
||||
|
||||
/* prototypes for functions in common/heaptuple.c */
|
||||
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,
|
||||
Datum *values, bool *isnull,
|
||||
const Datum *values, const bool *isnull,
|
||||
char *data, Size data_size,
|
||||
uint16 *infomask, bits8 *bit);
|
||||
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 Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc);
|
||||
extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor,
|
||||
Datum *values, bool *isnull);
|
||||
const Datum *values, const bool *isnull);
|
||||
extern HeapTuple heap_modify_tuple(HeapTuple tuple,
|
||||
TupleDesc tupleDesc,
|
||||
Datum *replValues,
|
||||
bool *replIsnull,
|
||||
bool *doReplace);
|
||||
const Datum *replValues,
|
||||
const bool *replIsnull,
|
||||
const bool *doReplace);
|
||||
extern HeapTuple heap_modify_tuple_by_cols(HeapTuple tuple,
|
||||
TupleDesc tupleDesc,
|
||||
int nCols,
|
||||
int *replCols,
|
||||
Datum *replValues,
|
||||
bool *replIsnull);
|
||||
const int *replCols,
|
||||
const Datum *replValues,
|
||||
const bool *replIsnull);
|
||||
extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
|
||||
Datum *values, bool *isnull);
|
||||
extern void heap_freetuple(HeapTuple htup);
|
||||
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 MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
|
||||
extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
|
||||
|
@@ -75,9 +75,9 @@ typedef IndexAttributeBitMapData * IndexAttributeBitMap;
|
||||
|
||||
/* routines in indextuple.c */
|
||||
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,
|
||||
Datum *values, bool *isnull,
|
||||
const Datum *values, const bool *isnull,
|
||||
MemoryContext context);
|
||||
extern Datum nocache_index_getattr(IndexTuple tup, int attnum,
|
||||
TupleDesc tupleDesc);
|
||||
|
@@ -506,10 +506,10 @@ extern void SpGistInitBuffer(Buffer b, uint16 f);
|
||||
extern void SpGistInitMetapage(Page page);
|
||||
extern unsigned int SpGistGetInnerTypeSize(SpGistTypeDesc *att, Datum datum);
|
||||
extern Size SpGistGetLeafTupleSize(TupleDesc tupleDescriptor,
|
||||
Datum *datums, bool *isnulls);
|
||||
const Datum *datums, const bool *isnulls);
|
||||
extern SpGistLeafTuple spgFormLeafTuple(SpGistState *state,
|
||||
ItemPointer heapPtr,
|
||||
Datum *datums, bool *isnulls);
|
||||
const Datum *datums, const bool *isnulls);
|
||||
extern SpGistNodeTuple spgFormNodeTuple(SpGistState *state,
|
||||
Datum label, bool isnull);
|
||||
extern SpGistInnerTuple spgFormInnerTuple(SpGistState *state,
|
||||
|
@@ -110,7 +110,7 @@ extern void toast_tuple_externalize(ToastTupleContext *ttc, int attribute,
|
||||
int options);
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
@@ -509,7 +509,7 @@ typedef struct TupOutputState
|
||||
extern TupOutputState *begin_tup_output_tupdesc(DestReceiver *dest,
|
||||
TupleDesc tupdesc,
|
||||
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 end_tup_output(TupOutputState *tstate);
|
||||
|
||||
@@ -639,7 +639,7 @@ extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
|
||||
extern void check_exclusion_constraint(Relation heap, Relation index,
|
||||
IndexInfo *indexInfo,
|
||||
ItemPointer tupleid,
|
||||
Datum *values, bool *isnull,
|
||||
const Datum *values, const bool *isnull,
|
||||
EState *estate, bool newIndex);
|
||||
|
||||
/*
|
||||
|
@@ -100,8 +100,8 @@ typedef struct PartitionBoundInfoData
|
||||
|
||||
extern int get_hash_partition_greatest_modulus(PartitionBoundInfo bound);
|
||||
extern uint64 compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc,
|
||||
Oid *partcollation,
|
||||
Datum *values, bool *isnull);
|
||||
const Oid *partcollation,
|
||||
const Datum *values, const bool *isnull);
|
||||
extern List *get_qual_from_partbound(Relation parent,
|
||||
PartitionBoundSpec *spec);
|
||||
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,
|
||||
const int *tzp);
|
||||
extern bool to_json_is_immutable(Oid typoid);
|
||||
extern Datum json_build_object_worker(int nargs, Datum *args, bool *nulls,
|
||||
Oid *types, bool absent_on_null,
|
||||
extern Datum json_build_object_worker(int nargs, const Datum *args, const bool *nulls,
|
||||
const Oid *types, bool absent_on_null,
|
||||
bool unique_keys);
|
||||
extern Datum json_build_array_worker(int nargs, Datum *args, bool *nulls,
|
||||
Oid *types, bool absent_on_null);
|
||||
extern Datum json_build_array_worker(int nargs, const Datum *args, const bool *nulls,
|
||||
const Oid *types, bool absent_on_null);
|
||||
extern bool json_validate(text *json, bool check_unique_keys, bool throw_error);
|
||||
|
||||
#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,
|
||||
bool *isnull, bool as_text);
|
||||
extern bool to_jsonb_is_immutable(Oid typoid);
|
||||
extern Datum jsonb_build_object_worker(int nargs, Datum *args, bool *nulls,
|
||||
Oid *types, bool absent_on_null,
|
||||
extern Datum jsonb_build_object_worker(int nargs, const Datum *args, const bool *nulls,
|
||||
const Oid *types, bool absent_on_null,
|
||||
bool unique_keys);
|
||||
extern Datum jsonb_build_array_worker(int nargs, Datum *args, bool *nulls,
|
||||
Oid *types, bool absent_on_null);
|
||||
extern Datum jsonb_build_array_worker(int nargs, const Datum *args, const bool *nulls,
|
||||
const Oid *types, bool absent_on_null);
|
||||
|
||||
#endif /* __JSONB_H__ */
|
||||
|
@@ -437,7 +437,7 @@ extern void tuplesort_puttupleslot(Tuplesortstate *state,
|
||||
extern void tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup);
|
||||
extern void tuplesort_putindextuplevalues(Tuplesortstate *state,
|
||||
Relation rel, ItemPointer self,
|
||||
Datum *values, bool *isnull);
|
||||
const Datum *values, const bool *isnull);
|
||||
extern void tuplesort_putdatum(Tuplesortstate *state, Datum val,
|
||||
bool isNull);
|
||||
|
||||
|
@@ -54,7 +54,7 @@ extern void tuplestore_puttupleslot(Tuplestorestate *state,
|
||||
TupleTableSlot *slot);
|
||||
extern void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple);
|
||||
extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
|
||||
Datum *values, bool *isnull);
|
||||
const Datum *values, const bool *isnull);
|
||||
|
||||
/* Backwards compatibility macro */
|
||||
#define tuplestore_donestoring(state) ((void) 0)
|
||||
|
Reference in New Issue
Block a user