diff options
Diffstat (limited to 'src/include/utils')
-rw-r--r-- | src/include/utils/acl.h | 2 | ||||
-rw-r--r-- | src/include/utils/builtins.h | 2 | ||||
-rw-r--r-- | src/include/utils/guc.h | 2 | ||||
-rw-r--r-- | src/include/utils/guc_tables.h | 4 | ||||
-rw-r--r-- | src/include/utils/json.h | 2 | ||||
-rw-r--r-- | src/include/utils/lsyscache.h | 10 | ||||
-rw-r--r-- | src/include/utils/memutils.h | 2 | ||||
-rw-r--r-- | src/include/utils/pg_crc_tables.h | 1 | ||||
-rw-r--r-- | src/include/utils/plancache.h | 34 | ||||
-rw-r--r-- | src/include/utils/rangetypes.h | 18 | ||||
-rw-r--r-- | src/include/utils/rel.h | 2 | ||||
-rw-r--r-- | src/include/utils/selfuncs.h | 2 | ||||
-rw-r--r-- | src/include/utils/sortsupport.h | 26 | ||||
-rw-r--r-- | src/include/utils/timestamp.h | 2 | ||||
-rw-r--r-- | src/include/utils/tqual.h | 2 | ||||
-rw-r--r-- | src/include/utils/typcache.h | 8 | ||||
-rw-r--r-- | src/include/utils/xml.h | 12 |
17 files changed, 63 insertions, 68 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index ff3c6aa1f62..6de39b21cf4 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -278,7 +278,7 @@ extern AclMode pg_foreign_data_wrapper_aclmask(Oid fdw_oid, Oid roleid, extern AclMode pg_foreign_server_aclmask(Oid srv_oid, Oid roleid, AclMode mask, AclMaskHow how); extern AclMode pg_type_aclmask(Oid type_oid, Oid roleid, - AclMode mask, AclMaskHow how); + AclMode mask, AclMaskHow how); extern AclResult pg_attribute_aclcheck(Oid table_oid, AttrNumber attnum, Oid roleid, AclMode mode); diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index f246f117ba3..d1e83707606 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -311,7 +311,7 @@ extern Datum btnamecmp(PG_FUNCTION_ARGS); extern Datum bttextcmp(PG_FUNCTION_ARGS); /* - * Per-opclass sort support functions for new btrees. Like the + * Per-opclass sort support functions for new btrees. Like the * functions above, these are stored in pg_amproc; most are defined in * access/nbtree/nbtcompare.c */ diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 38ed54891a6..68103877554 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -313,7 +313,7 @@ extern void ParseLongOption(const char *string, char **name, char **value); extern bool parse_int(const char *value, int *result, int flags, const char **hintmsg); extern bool parse_real(const char *value, double *result); -extern int set_config_option(const char *name, const char *value, +extern int set_config_option(const char *name, const char *value, GucContext context, GucSource source, GucAction action, bool changeVal, int elevel); extern char *GetConfigOptionByName(const char *name, const char **varname); diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index eaea4862c24..5d1ca06b2a0 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -120,7 +120,7 @@ typedef struct guc_stack GucSource source; /* source of the prior value */ /* masked value's source must be PGC_S_SESSION, so no need to store it */ GucContext scontext; /* context that set the prior value */ - GucContext masked_scontext; /* context that set the masked value */ + GucContext masked_scontext; /* context that set the masked value */ config_var_value prior; /* previous value of variable */ config_var_value masked; /* SET value in a GUC_SET_LOCAL entry */ } GucStack; @@ -152,7 +152,7 @@ struct config_generic GucSource source; /* source of the current actual value */ GucSource reset_source; /* source of the reset_value */ GucContext scontext; /* context that set the current value */ - GucContext reset_scontext; /* context that set the reset value */ + GucContext reset_scontext; /* context that set the reset value */ GucStack *stack; /* stacked prior values */ void *extra; /* "extra" pointer for current actual value */ char *sourcefile; /* file current setting is from (NULL if not diff --git a/src/include/utils/json.h b/src/include/utils/json.h index c355e0f73ee..0f38147acb8 100644 --- a/src/include/utils/json.h +++ b/src/include/utils/json.h @@ -25,6 +25,6 @@ extern Datum array_to_json(PG_FUNCTION_ARGS); extern Datum array_to_json_pretty(PG_FUNCTION_ARGS); extern Datum row_to_json(PG_FUNCTION_ARGS); extern Datum row_to_json_pretty(PG_FUNCTION_ARGS); -extern void escape_json(StringInfo buf, const char *str); +extern void escape_json(StringInfo buf, const char *str); #endif /* JSON_H */ diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 696ca77307f..4bf1029e109 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -18,10 +18,10 @@ /* Result list element for get_op_btree_interpretation */ typedef struct OpBtreeInterpretation { - Oid opfamily_id; /* btree opfamily containing operator */ - int strategy; /* its strategy number */ - Oid oplefttype; /* declared left input datatype */ - Oid oprighttype; /* declared right input datatype */ + Oid opfamily_id; /* btree opfamily containing operator */ + int strategy; /* its strategy number */ + Oid oplefttype; /* declared left input datatype */ + Oid oprighttype; /* declared right input datatype */ } OpBtreeInterpretation; /* I/O function selector for get_type_io_data */ @@ -149,7 +149,7 @@ extern void free_attstatsslot(Oid atttype, Datum *values, int nvalues, float4 *numbers, int nnumbers); extern char *get_namespace_name(Oid nspid); -extern Oid get_range_subtype(Oid rangeOid); +extern Oid get_range_subtype(Oid rangeOid); #define type_is_array(typid) (get_element_type(typid) != InvalidOid) /* type_is_array_domain accepts both plain arrays and domains over arrays */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index a2bb3d9c720..06c8afdd0aa 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -91,7 +91,7 @@ extern void MemoryContextResetChildren(MemoryContext context); extern void MemoryContextDeleteChildren(MemoryContext context); extern void MemoryContextResetAndDeleteChildren(MemoryContext context); extern void MemoryContextSetParent(MemoryContext context, - MemoryContext new_parent); + MemoryContext new_parent); extern Size GetMemoryChunkSpace(void *pointer); extern MemoryContext GetMemoryChunkContext(void *pointer); extern MemoryContext MemoryContextGetParent(MemoryContext context); diff --git a/src/include/utils/pg_crc_tables.h b/src/include/utils/pg_crc_tables.h index 524410fffdf..43052aa8987 100644 --- a/src/include/utils/pg_crc_tables.h +++ b/src/include/utils/pg_crc_tables.h @@ -511,7 +511,6 @@ const uint64 pg_crc64_table[256] = { UINT64CONST(0xD80C07CD676F8394), UINT64CONST(0x9AFCE626CE85B507) }; #endif /* SIZEOF_VOID_P < 8 */ - #endif /* PROVIDE_64BIT_CRC */ #endif /* PG_CRC_TABLES_H */ diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h index 9b1f7e46ec6..413e8462a6c 100644 --- a/src/include/utils/plancache.h +++ b/src/include/utils/plancache.h @@ -30,7 +30,7 @@ * the analyzed-and-rewritten query tree, and rebuild it when next needed. * * An actual execution plan, represented by CachedPlan, is derived from the - * CachedPlanSource when we need to execute the query. The plan could be + * CachedPlanSource when we need to execute the query. The plan could be * either generic (usable with any set of plan parameters) or custom (for a * specific set of parameters). plancache.c contains the logic that decides * which way to do it for any particular execution. If we are using a generic @@ -84,7 +84,7 @@ typedef struct CachedPlanSource List *query_list; /* list of Query nodes, or NIL if not valid */ List *relationOids; /* OIDs of relations the queries depend on */ List *invalItems; /* other dependencies, as PlanInvalItems */ - MemoryContext query_context; /* context holding the above, or NULL */ + MemoryContext query_context; /* context holding the above, or NULL */ /* If we have a generic plan, this is a reference-counted link to it: */ struct CachedPlan *gplan; /* generic plan, or NULL if not valid */ /* Some state flags: */ @@ -93,26 +93,26 @@ typedef struct CachedPlanSource bool is_valid; /* is the query_list currently valid? */ int generation; /* increments each time we create a plan */ /* If CachedPlanSource has been saved, it is a member of a global list */ - struct CachedPlanSource *next_saved; /* list link, if so */ + struct CachedPlanSource *next_saved; /* list link, if so */ /* State kept to help decide whether to use custom or generic plans: */ double generic_cost; /* cost of generic plan, or -1 if not known */ - double total_custom_cost; /* total cost of custom plans so far */ - int num_custom_plans; /* number of plans included in total */ + double total_custom_cost; /* total cost of custom plans so far */ + int num_custom_plans; /* number of plans included in total */ } CachedPlanSource; /* * CachedPlan represents an execution plan derived from a CachedPlanSource. * The reference count includes both the link from the parent CachedPlanSource * (if any), and any active plan executions, so the plan can be discarded - * exactly when refcount goes to zero. Both the struct itself and the + * exactly when refcount goes to zero. Both the struct itself and the * subsidiary data live in the context denoted by the context field. * This makes it easy to free a no-longer-needed cached plan. */ typedef struct CachedPlan { int magic; /* should equal CACHEDPLAN_MAGIC */ - List *stmt_list; /* list of statement nodes (PlannedStmts - * and bare utility statements) */ + List *stmt_list; /* list of statement nodes (PlannedStmts and + * bare utility statements) */ bool is_saved; /* is CachedPlan in a long-lived context? */ bool is_valid; /* is the stmt_list currently valid? */ TransactionId saved_xmin; /* if valid, replan when TransactionXmin @@ -130,20 +130,20 @@ extern CachedPlanSource *CreateCachedPlan(Node *raw_parse_tree, const char *query_string, const char *commandTag); extern void CompleteCachedPlan(CachedPlanSource *plansource, - List *querytree_list, - MemoryContext querytree_context, - Oid *param_types, - int num_params, - ParserSetupHook parserSetup, - void *parserSetupArg, - int cursor_options, - bool fixed_result); + List *querytree_list, + MemoryContext querytree_context, + Oid *param_types, + int num_params, + ParserSetupHook parserSetup, + void *parserSetupArg, + int cursor_options, + bool fixed_result); extern void SaveCachedPlan(CachedPlanSource *plansource); extern void DropCachedPlan(CachedPlanSource *plansource); extern void CachedPlanSetParentContext(CachedPlanSource *plansource, - MemoryContext newcontext); + MemoryContext newcontext); extern CachedPlanSource *CopyCachedPlan(CachedPlanSource *plansource); diff --git a/src/include/utils/rangetypes.h b/src/include/utils/rangetypes.h index 7b6ff198d47..ad72df57dd6 100644 --- a/src/include/utils/rangetypes.h +++ b/src/include/utils/rangetypes.h @@ -30,7 +30,7 @@ typedef struct } RangeType; /* Use this macro in preference to fetching rangetypid field directly */ -#define RangeTypeGetOid(r) ((r)->rangetypid) +#define RangeTypeGetOid(r) ((r)->rangetypid) /* A range's flags byte contains these bits: */ #define RANGE_EMPTY 0x01 /* range is empty */ @@ -40,8 +40,8 @@ typedef struct #define RANGE_UB_INF 0x10 /* upper bound is +infinity */ #define RANGE_LB_NULL 0x20 /* lower bound is null (NOT USED) */ #define RANGE_UB_NULL 0x40 /* upper bound is null (NOT USED) */ -#define RANGE_CONTAIN_EMPTY 0x80 /* marks a GiST internal-page entry whose - * subtree contains some empty ranges */ +#define RANGE_CONTAIN_EMPTY 0x80/* marks a GiST internal-page entry whose + * subtree contains some empty ranges */ #define RANGE_HAS_LBOUND(flags) (!((flags) & (RANGE_EMPTY | \ RANGE_LB_NULL | \ @@ -149,18 +149,18 @@ extern Datum tstzrange_subdiff(PG_FUNCTION_ARGS); /* assorted support functions */ extern TypeCacheEntry *range_get_typcache(FunctionCallInfo fcinfo, - Oid rngtypid); + Oid rngtypid); extern RangeType *range_serialize(TypeCacheEntry *typcache, RangeBound *lower, - RangeBound *upper, bool empty); + RangeBound *upper, bool empty); extern void range_deserialize(TypeCacheEntry *typcache, RangeType *range, - RangeBound *lower, RangeBound *upper, - bool *empty); + RangeBound *lower, RangeBound *upper, + bool *empty); extern char range_get_flags(RangeType *range); extern void range_set_contain_empty(RangeType *range); extern RangeType *make_range(TypeCacheEntry *typcache, RangeBound *lower, - RangeBound *upper, bool empty); + RangeBound *upper, bool empty); extern int range_cmp_bounds(TypeCacheEntry *typcache, RangeBound *b1, - RangeBound *b2); + RangeBound *b2); extern int range_cmp_bound_values(TypeCacheEntry *typcache, RangeBound *b1, RangeBound *b2); extern RangeType *make_empty_range(TypeCacheEntry *typcache); diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index d404c2adb51..4669d8a67ef 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -196,7 +196,7 @@ typedef struct StdRdOptions int32 vl_len_; /* varlena header (do not touch directly!) */ int fillfactor; /* page fill factor in percent (0..100) */ AutoVacOpts autovacuum; /* autovacuum-related options */ - bool security_barrier; /* for views */ + bool security_barrier; /* for views */ } StdRdOptions; #define HEAP_MIN_FILLFACTOR 10 diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index 4529f276839..87c6554b327 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -121,7 +121,7 @@ extern void get_join_variables(PlannerInfo *root, List *args, VariableStatData *vardata2, bool *join_is_reversed); extern double get_variable_numdistinct(VariableStatData *vardata, - bool *isdefault); + bool *isdefault); extern double mcv_selectivity(VariableStatData *vardata, FmgrInfo *opproc, Datum constval, bool varonleft, double *sumcommonp); diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h index ef8d8534934..720a54c0d76 100644 --- a/src/include/utils/sortsupport.h +++ b/src/include/utils/sortsupport.h @@ -33,7 +33,7 @@ * * Note: since pg_amproc functions are indexed by (lefttype, righttype) * it is possible to associate a BTSORTSUPPORT function with a cross-type - * comparison. This could sensibly be used to provide a fast comparator + * comparison. This could sensibly be used to provide a fast comparator * function for such cases, but probably not any other acceleration method. * * @@ -57,28 +57,28 @@ typedef struct SortSupportData * These fields are initialized before calling the BTSORTSUPPORT function * and should not be changed later. */ - MemoryContext ssup_cxt; /* Context containing sort info */ - Oid ssup_collation; /* Collation to use, or InvalidOid */ + MemoryContext ssup_cxt; /* Context containing sort info */ + Oid ssup_collation; /* Collation to use, or InvalidOid */ /* - * Additional sorting parameters; but unlike ssup_collation, these can - * be changed after BTSORTSUPPORT is called, so don't use them in - * selecting sort support functions. + * Additional sorting parameters; but unlike ssup_collation, these can be + * changed after BTSORTSUPPORT is called, so don't use them in selecting + * sort support functions. */ - bool ssup_reverse; /* descending-order sort? */ + bool ssup_reverse; /* descending-order sort? */ bool ssup_nulls_first; /* sort nulls first? */ /* * These fields are workspace for callers, and should not be touched by * opclass-specific functions. */ - AttrNumber ssup_attno; /* column number to sort */ + AttrNumber ssup_attno; /* column number to sort */ /* - * ssup_extra is zeroed before calling the BTSORTSUPPORT function, and - * is not touched subsequently by callers. + * ssup_extra is zeroed before calling the BTSORTSUPPORT function, and is + * not touched subsequently by callers. */ - void *ssup_extra; /* Workspace for opclass functions */ + void *ssup_extra; /* Workspace for opclass functions */ /* * Function pointers are zeroed before calling the BTSORTSUPPORT function, @@ -140,13 +140,11 @@ ApplySortComparator(Datum datum1, bool isNull1, return compare; } - #else -extern int ApplySortComparator(Datum datum1, bool isNull1, +extern int ApplySortComparator(Datum datum1, bool isNull1, Datum datum2, bool isNull2, SortSupport ssup); - #endif /* USE_INLINE */ /* Other functions in utils/sort/sortsupport.c */ diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 56699247668..665e969498c 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -42,7 +42,6 @@ #define PG_RETURN_TIMESTAMP(x) return TimestampGetDatum(x) #define PG_RETURN_TIMESTAMPTZ(x) return TimestampTzGetDatum(x) #define PG_RETURN_INTERVAL_P(x) return IntervalPGetDatum(x) - #else /* !HAVE_INT64_TIMESTAMP */ #define DatumGetTimestamp(X) ((Timestamp) DatumGetFloat8(X)) @@ -60,7 +59,6 @@ #define PG_RETURN_TIMESTAMP(x) return TimestampGetDatum(x) #define PG_RETURN_TIMESTAMPTZ(x) return TimestampTzGetDatum(x) #define PG_RETURN_INTERVAL_P(x) return IntervalPGetDatum(x) - #endif /* HAVE_INT64_TIMESTAMP */ diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 3d8a480d810..ff74f868a6f 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -84,7 +84,7 @@ extern HTSU_Result HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, Buffer buffer); extern bool HeapTupleIsSurelyDead(HeapTupleHeader tuple, - TransactionId OldestXmin); + TransactionId OldestXmin); extern void HeapTupleSetHintBits(HeapTupleHeader tuple, Buffer buffer, uint16 infomask, TransactionId xid); diff --git a/src/include/utils/typcache.h b/src/include/utils/typcache.h index 935fb864a38..12fb4f83101 100644 --- a/src/include/utils/typcache.h +++ b/src/include/utils/typcache.h @@ -73,13 +73,13 @@ typedef struct TypeCacheEntry TupleDesc tupDesc; /* - * Fields computed when TYPECACHE_RANGE_INFO is requested. Zeroes if - * not a range type or information hasn't yet been requested. Note that + * Fields computed when TYPECACHE_RANGE_INFO is requested. Zeroes if not + * a range type or information hasn't yet been requested. Note that * rng_cmp_proc_finfo could be different from the element type's default * btree comparison function. */ - struct TypeCacheEntry *rngelemtype; /* range's element type */ - Oid rng_collation; /* collation for comparisons, if any */ + struct TypeCacheEntry *rngelemtype; /* range's element type */ + Oid rng_collation; /* collation for comparisons, if any */ FmgrInfo rng_cmp_proc_finfo; /* comparison function */ FmgrInfo rng_canonical_finfo; /* canonicalization function, if any */ FmgrInfo rng_subdiff_finfo; /* difference function, if any */ diff --git a/src/include/utils/xml.h b/src/include/utils/xml.h index a36e26f2ed0..a645af918c3 100644 --- a/src/include/utils/xml.h +++ b/src/include/utils/xml.h @@ -37,11 +37,11 @@ typedef enum typedef enum { - PG_XML_STRICTNESS_LEGACY, /* ignore errors unless function result - * indicates error condition */ - PG_XML_STRICTNESS_WELLFORMED, /* ignore non-parser messages */ - PG_XML_STRICTNESS_ALL /* report all notices/warnings/errors */ -} PgXmlStrictness; + PG_XML_STRICTNESS_LEGACY, /* ignore errors unless function result + * indicates error condition */ + PG_XML_STRICTNESS_WELLFORMED, /* ignore non-parser messages */ + PG_XML_STRICTNESS_ALL /* report all notices/warnings/errors */ +} PgXmlStrictness; /* struct PgXmlErrorContext is private to xml.c */ typedef struct PgXmlErrorContext PgXmlErrorContext; @@ -90,7 +90,7 @@ extern PgXmlErrorContext *pg_xml_init(PgXmlStrictness strictness); extern void pg_xml_done(PgXmlErrorContext *errcxt, bool isError); extern bool pg_xml_error_occurred(PgXmlErrorContext *errcxt); extern void xml_ereport(PgXmlErrorContext *errcxt, int level, int sqlcode, - const char *msg); + const char *msg); extern xmltype *xmlconcat(List *args); extern xmltype *xmlelement(XmlExprState *xmlExpr, ExprContext *econtext); |