Commit 807e4bc8 authored by Peter Eisentraut's avatar Peter Eisentraut

Sprinkle some const decorations

These mainly help understanding the function signatures better.
parent 55853d66
...@@ -540,7 +540,7 @@ coerce_type(ParseState *pstate, Node *node, ...@@ -540,7 +540,7 @@ coerce_type(ParseState *pstate, Node *node,
* as this determines the set of available casts. * as this determines the set of available casts.
*/ */
bool bool
can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids, can_coerce_type(int nargs, const Oid *input_typeids, const Oid *target_typeids,
CoercionContext ccontext) CoercionContext ccontext)
{ {
bool have_generics = false; bool have_generics = false;
...@@ -1467,8 +1467,8 @@ coerce_to_common_type(ParseState *pstate, Node *node, ...@@ -1467,8 +1467,8 @@ coerce_to_common_type(ParseState *pstate, Node *node,
* We do not ereport here, but just return false if a rule is violated. * We do not ereport here, but just return false if a rule is violated.
*/ */
bool bool
check_generic_type_consistency(Oid *actual_arg_types, check_generic_type_consistency(const Oid *actual_arg_types,
Oid *declared_arg_types, const Oid *declared_arg_types,
int nargs) int nargs)
{ {
int j; int j;
...@@ -1664,7 +1664,7 @@ check_generic_type_consistency(Oid *actual_arg_types, ...@@ -1664,7 +1664,7 @@ check_generic_type_consistency(Oid *actual_arg_types,
* assume that successive inputs are of the same actual element type. * assume that successive inputs are of the same actual element type.
*/ */
Oid Oid
enforce_generic_type_consistency(Oid *actual_arg_types, enforce_generic_type_consistency(const Oid *actual_arg_types,
Oid *declared_arg_types, Oid *declared_arg_types,
int nargs, int nargs,
Oid rettype, Oid rettype,
......
...@@ -41,7 +41,7 @@ extern Node *coerce_to_target_type(ParseState *pstate, ...@@ -41,7 +41,7 @@ extern Node *coerce_to_target_type(ParseState *pstate,
CoercionContext ccontext, CoercionContext ccontext,
CoercionForm cformat, CoercionForm cformat,
int location); int location);
extern bool can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids, extern bool can_coerce_type(int nargs, const Oid *input_typeids, const Oid *target_typeids,
CoercionContext ccontext); CoercionContext ccontext);
extern Node *coerce_type(ParseState *pstate, Node *node, extern Node *coerce_type(ParseState *pstate, Node *node,
Oid inputTypeId, Oid targetTypeId, int32 targetTypeMod, Oid inputTypeId, Oid targetTypeId, int32 targetTypeMod,
...@@ -71,10 +71,10 @@ extern Node *coerce_to_common_type(ParseState *pstate, Node *node, ...@@ -71,10 +71,10 @@ extern Node *coerce_to_common_type(ParseState *pstate, Node *node,
Oid targetTypeId, Oid targetTypeId,
const char *context); const char *context);
extern bool check_generic_type_consistency(Oid *actual_arg_types, extern bool check_generic_type_consistency(const Oid *actual_arg_types,
Oid *declared_arg_types, const Oid *declared_arg_types,
int nargs); int nargs);
extern Oid enforce_generic_type_consistency(Oid *actual_arg_types, extern Oid enforce_generic_type_consistency(const Oid *actual_arg_types,
Oid *declared_arg_types, Oid *declared_arg_types,
int nargs, int nargs,
Oid rettype, Oid rettype,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment