diff options
| author | Bruce Momjian <bruce@momjian.us> | 2015-05-23 21:35:49 -0400 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2015-05-23 21:35:49 -0400 |
| commit | 807b9e0dff663c5da875af7907a5106c0ff90673 (patch) | |
| tree | 89a0cfbd3c9801dcb04aae4ccf2fee935092f958 /src/include/utils | |
| parent | 225892552bd3052982d2b97b749e5945ea71facc (diff) | |
| download | postgresql-807b9e0dff663c5da875af7907a5106c0ff90673.tar.gz | |
pgindent run for 9.5
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/acl.h | 2 | ||||
| -rw-r--r-- | src/include/utils/aclchk_internal.h | 2 | ||||
| -rw-r--r-- | src/include/utils/builtins.h | 6 | ||||
| -rw-r--r-- | src/include/utils/guc.h | 3 | ||||
| -rw-r--r-- | src/include/utils/guc_tables.h | 2 | ||||
| -rw-r--r-- | src/include/utils/jsonapi.h | 2 | ||||
| -rw-r--r-- | src/include/utils/jsonb.h | 10 | ||||
| -rw-r--r-- | src/include/utils/lsyscache.h | 4 | ||||
| -rw-r--r-- | src/include/utils/palloc.h | 2 | ||||
| -rw-r--r-- | src/include/utils/pg_crc.h | 2 | ||||
| -rw-r--r-- | src/include/utils/plancache.h | 2 | ||||
| -rw-r--r-- | src/include/utils/rls.h | 18 | ||||
| -rw-r--r-- | src/include/utils/ruleutils.h | 2 | ||||
| -rw-r--r-- | src/include/utils/sampling.h | 10 | ||||
| -rw-r--r-- | src/include/utils/selfuncs.h | 2 | ||||
| -rw-r--r-- | src/include/utils/snapshot.h | 2 | ||||
| -rw-r--r-- | src/include/utils/sortsupport.h | 83 |
17 files changed, 78 insertions, 76 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index d747579e7a..915ea39be2 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -230,7 +230,7 @@ extern bool is_admin_of_role(Oid member, Oid role); extern void check_is_member_of_role(Oid member, Oid role); extern Oid get_role_oid(const char *rolename, bool missing_ok); extern Oid get_role_oid_or_public(const char *rolename); -extern Oid get_rolespec_oid(const Node *node, bool missing_ok); +extern Oid get_rolespec_oid(const Node *node, bool missing_ok); extern HeapTuple get_rolespec_tuple(const Node *node); extern char *get_rolespec_name(const Node *node); diff --git a/src/include/utils/aclchk_internal.h b/src/include/utils/aclchk_internal.h index 0855bf1d0d..8378567578 100644 --- a/src/include/utils/aclchk_internal.h +++ b/src/include/utils/aclchk_internal.h @@ -42,4 +42,4 @@ typedef struct } InternalGrant; -#endif /* ACLCHK_INTERNAL_H */ +#endif /* ACLCHK_INTERNAL_H */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 1140c17792..51f25a2814 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -657,7 +657,7 @@ extern List *stringToQualifiedNameList(const char *string); extern char *format_procedure(Oid procedure_oid); extern char *format_procedure_qualified(Oid procedure_oid); extern void format_procedure_parts(Oid operator_oid, List **objnames, - List **objargs); + List **objargs); extern char *format_operator(Oid operator_oid); extern char *format_operator_qualified(Oid operator_oid); extern void format_operator_parts(Oid operator_oid, List **objnames, @@ -804,9 +804,9 @@ extern Datum textoverlay_no_len(PG_FUNCTION_ARGS); extern Datum name_text(PG_FUNCTION_ARGS); extern Datum text_name(PG_FUNCTION_ARGS); extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid); -extern int varstr_levenshtein(const char *source, int slen, const char *target, +extern int varstr_levenshtein(const char *source, int slen, const char *target, int tlen, int ins_c, int del_c, int sub_c); -extern int varstr_levenshtein_less_equal(const char *source, int slen, +extern int varstr_levenshtein_less_equal(const char *source, int slen, const char *target, int tlen, int ins_c, int del_c, int sub_c, int max_d); extern List *textToQualifiedNameList(text *textval); diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index ff78b70b96..a8191c94c3 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -202,7 +202,8 @@ typedef enum #define GUC_SUPERUSER_ONLY 0x0100 /* show only to superusers */ #define GUC_IS_NAME 0x0200 /* limit string to NAMEDATALEN-1 */ #define GUC_NOT_WHILE_SEC_REST 0x0400 /* can't set if security restricted */ -#define GUC_DISALLOW_IN_AUTO_FILE 0x0800 /* can't set in PG_AUTOCONF_FILENAME */ +#define GUC_DISALLOW_IN_AUTO_FILE 0x0800 /* can't set in + * PG_AUTOCONF_FILENAME */ #define GUC_UNIT_KB 0x1000 /* value is in kilobytes */ #define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */ diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index c0f9cb9374..7a58ddb10b 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -167,7 +167,7 @@ struct config_generic * Caution: the GUC_IS_IN_FILE bit is transient state for ProcessConfigFile. * Do not assume that its value represents useful information elsewhere. */ -#define GUC_PENDING_RESTART 0x0002 +#define GUC_PENDING_RESTART 0x0002 /* GUC records for specific variable types */ diff --git a/src/include/utils/jsonapi.h b/src/include/utils/jsonapi.h index 1d8293b223..296d20af83 100644 --- a/src/include/utils/jsonapi.h +++ b/src/include/utils/jsonapi.h @@ -122,6 +122,6 @@ extern JsonLexContext *makeJsonLexContextCstringLen(char *json, * * str agrument does not need to be nul-terminated. */ -extern bool IsValidJsonNumber(const char * str, int len); +extern bool IsValidJsonNumber(const char *str, int len); #endif /* JSONAPI_H */ diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h index b02934a1ae..4d614430ce 100644 --- a/src/include/utils/jsonb.h +++ b/src/include/utils/jsonb.h @@ -244,7 +244,7 @@ struct JsonbValue union { Numeric numeric; - bool boolean; + bool boolean; struct { int len; @@ -401,9 +401,9 @@ extern Datum jsonb_pretty(PG_FUNCTION_ARGS); extern Datum jsonb_concat(PG_FUNCTION_ARGS); /* deletion */ -Datum jsonb_delete(PG_FUNCTION_ARGS); -Datum jsonb_delete_idx(PG_FUNCTION_ARGS); -Datum jsonb_delete_path(PG_FUNCTION_ARGS); +Datum jsonb_delete(PG_FUNCTION_ARGS); +Datum jsonb_delete_idx(PG_FUNCTION_ARGS); +Datum jsonb_delete_path(PG_FUNCTION_ARGS); /* replacement */ extern Datum jsonb_replace(PG_FUNCTION_ARGS); @@ -431,7 +431,7 @@ extern void JsonbHashScalarValue(const JsonbValue *scalarVal, uint32 *hash); extern char *JsonbToCString(StringInfo out, JsonbContainer *in, int estimated_len); extern char *JsonbToCStringIndent(StringInfo out, JsonbContainer *in, - int estimated_len); + int estimated_len); #endif /* __JSONB_H__ */ diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index e2e5734ea7..a40c9b1273 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -102,8 +102,8 @@ extern Oid get_rel_namespace(Oid relid); extern Oid get_rel_type_id(Oid relid); extern char get_rel_relkind(Oid relid); extern Oid get_rel_tablespace(Oid relid); -extern Oid get_transform_fromsql(Oid typid, Oid langid, List *trftypes); -extern Oid get_transform_tosql(Oid typid, Oid langid, List *trftypes); +extern Oid get_transform_fromsql(Oid typid, Oid langid, List *trftypes); +extern Oid get_transform_tosql(Oid typid, Oid langid, List *trftypes); extern bool get_typisdefined(Oid typid); extern int16 get_typlen(Oid typid); extern bool get_typbyval(Oid typid); diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index 9861f0dac7..e56f5014a3 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -72,7 +72,7 @@ extern void *MemoryContextAlloc(MemoryContext context, Size size); extern void *MemoryContextAllocZero(MemoryContext context, Size size); extern void *MemoryContextAllocZeroAligned(MemoryContext context, Size size); extern void *MemoryContextAllocExtended(MemoryContext context, - Size size, int flags); + Size size, int flags); extern void *palloc(Size size); extern void *palloc0(Size size); diff --git a/src/include/utils/pg_crc.h b/src/include/utils/pg_crc.h index b4efe157f1..37bb0e933b 100644 --- a/src/include/utils/pg_crc.h +++ b/src/include/utils/pg_crc.h @@ -93,7 +93,7 @@ do { \ \ while (__len-- > 0) \ { \ - int __tab_index = ((int) ((crc) >> 24) ^ *__data++) & 0xFF; \ + int __tab_index = ((int) ((crc) >> 24) ^ *__data++) & 0xFF; \ (crc) = table[__tab_index] ^ ((crc) << 8); \ } \ } while (0) diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h index ef206c47ea..90a018082f 100644 --- a/src/include/utils/plancache.h +++ b/src/include/utils/plancache.h @@ -109,7 +109,7 @@ typedef struct CachedPlanSource 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 */ - bool hasRowSecurity; /* planned with row security? */ + bool hasRowSecurity; /* planned with row security? */ int row_security_env; /* row security setting when planned */ bool rowSecurityDisabled; /* is row security disabled? */ } CachedPlanSource; diff --git a/src/include/utils/rls.h b/src/include/utils/rls.h index 867faa05ff..3770ddc216 100644 --- a/src/include/utils/rls.h +++ b/src/include/utils/rls.h @@ -14,15 +14,15 @@ #define RLS_H /* GUC variable */ -extern int row_security; +extern int row_security; /* Possible values for row_security GUC */ typedef enum RowSecurityConfigType { - ROW_SECURITY_OFF, /* RLS never applied- error thrown if no priv */ - ROW_SECURITY_ON, /* normal case, RLS applied for regular users */ - ROW_SECURITY_FORCE /* RLS applied for superusers and table owners */ -} RowSecurityConfigType; + ROW_SECURITY_OFF, /* RLS never applied- error thrown if no priv */ + ROW_SECURITY_ON, /* normal case, RLS applied for regular users */ + ROW_SECURITY_FORCE /* RLS applied for superusers and table owners */ +} RowSecurityConfigType; /* * Used by callers of check_enable_rls. @@ -48,11 +48,11 @@ typedef enum RowSecurityConfigType */ enum CheckEnableRlsResult { - RLS_NONE, - RLS_NONE_ENV, - RLS_ENABLED + RLS_NONE, + RLS_NONE_ENV, + RLS_ENABLED }; -extern int check_enable_rls(Oid relid, Oid checkAsUser, bool noError); +extern int check_enable_rls(Oid relid, Oid checkAsUser, bool noError); #endif /* RLS_H */ diff --git a/src/include/utils/ruleutils.h b/src/include/utils/ruleutils.h index fed9c7b6ff..3494b13b0f 100644 --- a/src/include/utils/ruleutils.h +++ b/src/include/utils/ruleutils.h @@ -32,4 +32,4 @@ extern List *select_rtable_names_for_explain(List *rtable, Bitmapset *rels_used); extern char *generate_collation_name(Oid collid); -#endif /* RULEUTILS_H */ +#endif /* RULEUTILS_H */ diff --git a/src/include/utils/sampling.h b/src/include/utils/sampling.h index 476bb00234..1653ed0aa4 100644 --- a/src/include/utils/sampling.h +++ b/src/include/utils/sampling.h @@ -20,7 +20,7 @@ typedef unsigned short SamplerRandomState[3]; extern void sampler_random_init_state(long seed, - SamplerRandomState randstate); + SamplerRandomState randstate); extern double sampler_random_fract(SamplerRandomState randstate); /* Block sampling methods */ @@ -32,7 +32,7 @@ typedef struct int n; /* desired sample size */ BlockNumber t; /* current block number */ int m; /* blocks selected so far */ - SamplerRandomState randstate; /* random generator state */ + SamplerRandomState randstate; /* random generator state */ } BlockSamplerData; typedef BlockSamplerData *BlockSampler; @@ -46,8 +46,8 @@ extern BlockNumber BlockSampler_Next(BlockSampler bs); typedef struct { - double W; - SamplerRandomState randstate; /* random generator state */ + double W; + SamplerRandomState randstate; /* random generator state */ } ReservoirStateData; typedef ReservoirStateData *ReservoirState; @@ -62,4 +62,4 @@ extern double anl_random_fract(void); extern double anl_init_selection_state(int n); extern double anl_get_next_S(double t, int n, double *stateptr); -#endif /* SAMPLING_H */ +#endif /* SAMPLING_H */ diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index fdca7130bb..b3d8017b8b 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -185,7 +185,7 @@ extern void mergejoinscansel(PlannerInfo *root, Node *clause, Selectivity *rightstart, Selectivity *rightend); extern double estimate_num_groups(PlannerInfo *root, List *groupExprs, - double input_rows, List **pgset); + double input_rows, List **pgset); extern Selectivity estimate_hash_bucketsize(PlannerInfo *root, Node *hashkey, double nbuckets); diff --git a/src/include/utils/snapshot.h b/src/include/utils/snapshot.h index a734bf0075..cbf1bbdeb1 100644 --- a/src/include/utils/snapshot.h +++ b/src/include/utils/snapshot.h @@ -118,7 +118,7 @@ typedef enum HeapTupleSelfUpdated, HeapTupleUpdated, HeapTupleBeingUpdated, - HeapTupleWouldBlock /* can be returned by heap_tuple_lock */ + HeapTupleWouldBlock /* can be returned by heap_tuple_lock */ } HTSU_Result; #endif /* SNAPSHOT_H */ diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h index 44c596f507..787404ed90 100644 --- a/src/include/utils/sortsupport.h +++ b/src/include/utils/sortsupport.h @@ -100,18 +100,18 @@ typedef struct SortSupportData * INT_MIN, as callers are allowed to negate the result before using it. * * This may be either the authoritative comparator, or the abbreviated - * comparator. Core code may switch this over the initial preference of an - * opclass support function despite originally indicating abbreviation was - * applicable, by assigning the authoritative comparator back. + * comparator. Core code may switch this over the initial preference of + * an opclass support function despite originally indicating abbreviation + * was applicable, by assigning the authoritative comparator back. */ int (*comparator) (Datum x, Datum y, SortSupport ssup); /* * "Abbreviated key" infrastructure follows. * - * All callbacks must be set by sortsupport opclasses that make use of this - * optional additional infrastructure (unless for whatever reasons the - * opclass doesn't proceed with abbreviation, in which case + * All callbacks must be set by sortsupport opclasses that make use of + * this optional additional infrastructure (unless for whatever reasons + * the opclass doesn't proceed with abbreviation, in which case * abbrev_converter must not be set). * * This allows opclass authors to supply a conversion routine, used to @@ -120,20 +120,20 @@ typedef struct SortSupportData * pass-by-value Datum format that only the opclass has knowledge of. An * alternative comparator, used only with this alternative representation * must also be provided (which is assigned to "comparator"). This - * representation is a simple approximation of the original Datum. It must - * be possible to compare datums of this representation with each other - * using the supplied alternative comparator, and have any non-zero return - * value be a reliable proxy for what a proper comparison would indicate. - * Returning zero from the alternative comparator does not indicate - * equality, as with a conventional support routine 1, though -- it - * indicates that it wasn't possible to determine how the two abbreviated - * values compared. A proper comparison, using "abbrev_full_comparator"/ - * ApplySortAbbrevFullComparator() is therefore required. In many cases - * this results in most or all comparisons only using the cheap alternative - * comparison func, which is typically implemented as code that compiles to - * just a few CPU instructions. CPU cache miss penalties are expensive; to - * get good overall performance, sort infrastructure must heavily weigh - * cache performance. + * representation is a simple approximation of the original Datum. It + * must be possible to compare datums of this representation with each + * other using the supplied alternative comparator, and have any non-zero + * return value be a reliable proxy for what a proper comparison would + * indicate. Returning zero from the alternative comparator does not + * indicate equality, as with a conventional support routine 1, though -- + * it indicates that it wasn't possible to determine how the two + * abbreviated values compared. A proper comparison, using + * "abbrev_full_comparator"/ ApplySortAbbrevFullComparator() is therefore + * required. In many cases this results in most or all comparisons only + * using the cheap alternative comparison func, which is typically + * implemented as code that compiles to just a few CPU instructions. CPU + * cache miss penalties are expensive; to get good overall performance, + * sort infrastructure must heavily weigh cache performance. * * Opclass authors must consider the final cardinality of abbreviated keys * when devising an encoding scheme. It's possible for a strategy to work @@ -143,16 +143,16 @@ typedef struct SortSupportData */ /* - * "abbreviate" concerns whether or not the abbreviated key optimization is - * applicable in principle (that is, the sortsupport routine needs to know - * if its dealing with a key where an abbreviated representation can + * "abbreviate" concerns whether or not the abbreviated key optimization + * is applicable in principle (that is, the sortsupport routine needs to + * know if its dealing with a key where an abbreviated representation can * usefully be packed together. Conventionally, this is the leading * attribute key). Note, however, that in order to determine that * abbreviation is not in play, the core code always checks whether or not * the opclass has set abbrev_converter. This is a one way, one time * message to the opclass. */ - bool abbreviate; + bool abbreviate; /* * Converter to abbreviated format, from original representation. Core @@ -161,24 +161,25 @@ typedef struct SortSupportData * guaranteed NOT NULL, because it doesn't make sense to factor NULLness * into ad-hoc cost model. * - * abbrev_converter is tested to see if abbreviation is in play. Core code - * may set it to NULL to indicate abbreviation should not be used (which is - * something sortsupport routines need not concern themselves with). - * However, sortsupport routines must not set it when it is immediately - * established that abbreviation should not proceed (e.g., for !abbreviate - * calls, or due to platform-specific impediments to using abbreviation). + * abbrev_converter is tested to see if abbreviation is in play. Core + * code may set it to NULL to indicate abbreviation should not be used + * (which is something sortsupport routines need not concern themselves + * with). However, sortsupport routines must not set it when it is + * immediately established that abbreviation should not proceed (e.g., for + * !abbreviate calls, or due to platform-specific impediments to using + * abbreviation). */ - Datum (*abbrev_converter) (Datum original, SortSupport ssup); + Datum (*abbrev_converter) (Datum original, SortSupport ssup); /* - * abbrev_abort callback allows clients to verify that the current strategy - * is working out, using a sortsupport routine defined ad-hoc cost model. - * If there is a lot of duplicate abbreviated keys in practice, it's useful - * to be able to abandon the strategy before paying too high a cost in - * conversion (perhaps certain opclass-specific adaptations are useful - * too). + * abbrev_abort callback allows clients to verify that the current + * strategy is working out, using a sortsupport routine defined ad-hoc + * cost model. If there is a lot of duplicate abbreviated keys in + * practice, it's useful to be able to abandon the strategy before paying + * too high a cost in conversion (perhaps certain opclass-specific + * adaptations are useful too). */ - bool (*abbrev_abort) (int memtupcount, SortSupport ssup); + bool (*abbrev_abort) (int memtupcount, SortSupport ssup); /* * Full, authoritative comparator for key that an abbreviated @@ -200,8 +201,8 @@ extern int ApplySortComparator(Datum datum1, bool isNull1, Datum datum2, bool isNull2, SortSupport ssup); extern int ApplySortAbbrevFullComparator(Datum datum1, bool isNull1, - Datum datum2, bool isNull2, - SortSupport ssup); + Datum datum2, bool isNull2, + SortSupport ssup); #endif /* !PG_USE_INLINE */ #if defined(PG_USE_INLINE) || defined(SORTSUPPORT_INCLUDE_DEFINITIONS) /* @@ -284,6 +285,6 @@ ApplySortAbbrevFullComparator(Datum datum1, bool isNull1, extern void PrepareSortSupportComparisonShim(Oid cmpFunc, SortSupport ssup); extern void PrepareSortSupportFromOrderingOp(Oid orderingOp, SortSupport ssup); extern void PrepareSortSupportFromIndexRel(Relation indexRel, int16 strategy, - SortSupport ssup); + SortSupport ssup); #endif /* SORTSUPPORT_H */ |
