summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorBruce Momjian2014-05-06 16:12:18 +0000
committerBruce Momjian2014-05-06 16:12:18 +0000
commit0a7832005792fa6dad171f9cadb8d587fe0dd800 (patch)
tree365cfc42c521a52607e41394b08ef44d338d8fc1 /src/include/utils
parentfb85cd4320414c3f6e9c8bc69ec944200ae1e493 (diff)
pgindent run for 9.4
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/acl.h4
-rw-r--r--src/include/utils/builtins.h2
-rw-r--r--src/include/utils/catcache.h8
-rw-r--r--src/include/utils/datetime.h4
-rw-r--r--src/include/utils/elog.h4
-rw-r--r--src/include/utils/guc.h4
-rw-r--r--src/include/utils/hsearch.h2
-rw-r--r--src/include/utils/inet.h4
-rw-r--r--src/include/utils/jsonapi.h4
-rw-r--r--src/include/utils/jsonb.h82
-rw-r--r--src/include/utils/memutils.h4
-rw-r--r--src/include/utils/palloc.h12
-rw-r--r--src/include/utils/pg_crc.h2
-rw-r--r--src/include/utils/plancache.h12
-rw-r--r--src/include/utils/portal.h6
-rw-r--r--src/include/utils/rel.h21
-rw-r--r--src/include/utils/relcache.h4
-rw-r--r--src/include/utils/relfilenodemap.h2
-rw-r--r--src/include/utils/resowner.h2
-rw-r--r--src/include/utils/resowner_private.h4
-rw-r--r--src/include/utils/selfuncs.h2
-rw-r--r--src/include/utils/snapshot.h10
-rw-r--r--src/include/utils/sortsupport.h2
-rw-r--r--src/include/utils/tqual.h12
-rw-r--r--src/include/utils/tuplesort.h8
-rw-r--r--src/include/utils/tuplestore.h2
-rw-r--r--src/include/utils/typcache.h6
27 files changed, 117 insertions, 112 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index f27e2fb7910..9430baa4a0b 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -81,11 +81,11 @@ typedef struct AclItem
/*
* Definitions for convenient access to Acl (array of AclItem).
* These are standard PostgreSQL arrays, but are restricted to have one
- * dimension and no nulls. We also ignore the lower bound when reading,
+ * dimension and no nulls. We also ignore the lower bound when reading,
* and set it to one when writing.
*
* CAUTION: as of PostgreSQL 7.1, these arrays are toastable (just like all
- * other array types). Therefore, be careful to detoast them with the
+ * other array types). Therefore, be careful to detoast them with the
* macros provided, unless you know for certain that a particular array
* can't have been toasted.
*/
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 33b6dca1919..bbb5d398a7a 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -318,7 +318,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/catcache.h b/src/include/utils/catcache.h
index dac1ac53ce9..697516b81ba 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -78,13 +78,13 @@ typedef struct catctup
/*
* Each tuple in a cache is a member of a dlist that stores the elements
- * of its hash bucket. We keep each dlist in LRU order to speed repeated
+ * of its hash bucket. We keep each dlist in LRU order to speed repeated
* lookups.
*/
dlist_node cache_elem; /* list member of per-bucket list */
/*
- * The tuple may also be a member of at most one CatCList. (If a single
+ * The tuple may also be a member of at most one CatCList. (If a single
* catcache is list-searched with varying numbers of keys, we may have to
* make multiple entries for the same tuple because of this restriction.
* Currently, that's not expected to be common, so we accept the potential
@@ -101,7 +101,7 @@ typedef struct catctup
*
* A negative cache entry is an assertion that there is no tuple matching
* a particular key. This is just as useful as a normal entry so far as
- * avoiding catalog searches is concerned. Management of positive and
+ * avoiding catalog searches is concerned. Management of positive and
* negative entries is identical.
*/
int refcount; /* number of active references */
@@ -120,7 +120,7 @@ typedef struct catclist
/*
* A CatCList describes the result of a partial search, ie, a search using
- * only the first K key columns of an N-key cache. We form the keys used
+ * only the first K key columns of an N-key cache. We form the keys used
* into a tuple (with other attributes NULL) to represent the stored key
* set. The CatCList object contains links to cache entries for all the
* table rows satisfying the partial key. (Note: none of these will be
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index fc3a1f611da..2e69503f96d 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -261,7 +261,7 @@ extern const int day_tab[2][13];
/*
* Datetime input parsing routines (ParseDateTime, DecodeDateTime, etc)
- * return zero or a positive value on success. On failure, they return
+ * return zero or a positive value on success. On failure, they return
* one of these negative code values. DateTimeParseError may be used to
* produce a correct ereport.
*/
@@ -283,7 +283,7 @@ extern int ParseDateTime(const char *timestr, char *workbuf, size_t buflen,
extern int DecodeDateTime(char **field, int *ftype,
int nf, int *dtype,
struct pg_tm * tm, fsec_t *fsec, int *tzp);
-extern int DecodeTimezone(char *str, int *tzp);
+extern int DecodeTimezone(char *str, int *tzp);
extern int DecodeTimeOnly(char **field, int *ftype,
int nf, int *dtype,
struct pg_tm * tm, fsec_t *fsec, int *tzp);
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 427d52d878c..92073be0ca5 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -89,13 +89,13 @@
* ... other errxxx() fields as needed ...));
*
* The error level is required, and so is a primary error message (errmsg
- * or errmsg_internal). All else is optional. errcode() defaults to
+ * or errmsg_internal). All else is optional. errcode() defaults to
* ERRCODE_INTERNAL_ERROR if elevel is ERROR or more, ERRCODE_WARNING
* if elevel is WARNING, or ERRCODE_SUCCESSFUL_COMPLETION if elevel is
* NOTICE or below.
*
* ereport_domain() allows a message domain to be specified, for modules that
- * wish to use a different message catalog from the backend's. To avoid having
+ * wish to use a different message catalog from the backend's. To avoid having
* one copy of the default text domain per .o file, we define it as NULL here
* and have errstart insert the default text domain. Modules can either use
* ereport_domain() directly, or preferably they can override the TEXTDOMAIN
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index be68f35d372..686a6a1d443 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -40,7 +40,7 @@
* configuration file, or by client request in the connection startup
* packet (e.g., from libpq's PGOPTIONS variable). Furthermore, an
* already-started backend will ignore changes to such an option in the
- * configuration file. The idea is that these options are fixed for a
+ * configuration file. The idea is that these options are fixed for a
* given backend once it's started, but they can vary across backends.
*
* SUSET options can be set at postmaster startup, with the SIGHUP
@@ -326,7 +326,7 @@ extern bool parse_real(const char *value, double *result);
extern int set_config_option(const char *name, const char *value,
GucContext context, GucSource source,
GucAction action, bool changeVal, int elevel);
-extern void AlterSystemSetConfigFile(AlterSystemStmt * setstmt);
+extern void AlterSystemSetConfigFile(AlterSystemStmt *setstmt);
extern char *GetConfigOptionByName(const char *name, const char **varname);
extern void GetConfigOptionByNum(int varnum, const char **values, bool *noshow);
extern int GetNumConfigOptions(void);
diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h
index 81b06d68afd..77974a193b2 100644
--- a/src/include/utils/hsearch.h
+++ b/src/include/utils/hsearch.h
@@ -30,7 +30,7 @@ typedef int (*HashCompareFunc) (const void *key1, const void *key2,
Size keysize);
/*
- * Key copying functions must have this signature. The return value is not
+ * Key copying functions must have this signature. The return value is not
* used. (The definition is set up to allow memcpy() and strncpy() to be
* used directly.)
*/
diff --git a/src/include/utils/inet.h b/src/include/utils/inet.h
index bd31c7169a1..8905a307f8a 100644
--- a/src/include/utils/inet.h
+++ b/src/include/utils/inet.h
@@ -40,7 +40,7 @@ typedef struct
/*
* Both INET and CIDR addresses are represented within Postgres as varlena
* objects, ie, there is a varlena header in front of the struct type
- * depicted above. This struct depicts what we actually have in memory
+ * depicted above. This struct depicts what we actually have in memory
* in "uncompressed" cases. Note that since the maximum data size is only
* 18 bytes, INET/CIDR will invariably be stored into tuples using the
* 1-byte-header varlena format. However, we have to be prepared to cope
@@ -54,7 +54,7 @@ typedef struct
} inet;
/*
- * Access macros. We use VARDATA_ANY so that we can process short-header
+ * Access macros. We use VARDATA_ANY so that we can process short-header
* varlena values without detoasting them. This requires a trick:
* VARDATA_ANY assumes the varlena header is already filled in, which is
* not the case when constructing a new value (until SET_INET_VARSIZE is
diff --git a/src/include/utils/jsonapi.h b/src/include/utils/jsonapi.h
index e4a2bd565dc..889364fb30e 100644
--- a/src/include/utils/jsonapi.h
+++ b/src/include/utils/jsonapi.h
@@ -110,7 +110,7 @@ extern void pg_parse_json(JsonLexContext *lex, JsonSemAction *sem);
*/
extern JsonLexContext *makeJsonLexContext(text *json, bool need_escapes);
extern JsonLexContext *makeJsonLexContextCstringLen(char *json,
- int len,
- bool need_escapes);
+ int len,
+ bool need_escapes);
#endif /* JSONAPI_H */
diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h
index 00a6d4f9e0b..dea64ad7805 100644
--- a/src/include/utils/jsonb.h
+++ b/src/include/utils/jsonb.h
@@ -29,14 +29,14 @@
/* Get information on varlena Jsonb */
#define JB_ROOT_COUNT(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_CMASK)
-#define JB_ROOT_IS_SCALAR(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FSCALAR)
-#define JB_ROOT_IS_OBJECT(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FOBJECT)
+#define JB_ROOT_IS_SCALAR(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FSCALAR)
+#define JB_ROOT_IS_OBJECT(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FOBJECT)
#define JB_ROOT_IS_ARRAY(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FARRAY)
/* Jentry macros */
#define JENTRY_POSMASK 0x0FFFFFFF
#define JENTRY_ISFIRST 0x80000000
-#define JENTRY_TYPEMASK (~(JENTRY_POSMASK | JENTRY_ISFIRST))
+#define JENTRY_TYPEMASK (~(JENTRY_POSMASK | JENTRY_ISFIRST))
#define JENTRY_ISSTRING 0x00000000
#define JENTRY_ISNUMERIC 0x10000000
#define JENTRY_ISNEST 0x20000000
@@ -55,9 +55,9 @@
#define JBE_ISBOOL_FALSE(je_) (JBE_ISBOOL(je_) && !JBE_ISBOOL_TRUE(je_))
/* Get offset for Jentry */
-#define JBE_ENDPOS(je_) ((je_).header & JENTRY_POSMASK)
-#define JBE_OFF(je_) (JBE_ISFIRST(je_) ? 0 : JBE_ENDPOS((&(je_))[-1]))
-#define JBE_LEN(je_) (JBE_ISFIRST(je_) ? \
+#define JBE_ENDPOS(je_) ((je_).header & JENTRY_POSMASK)
+#define JBE_OFF(je_) (JBE_ISFIRST(je_) ? 0 : JBE_ENDPOS((&(je_))[-1]))
+#define JBE_LEN(je_) (JBE_ISFIRST(je_) ? \
JBE_ENDPOS(je_) \
: JBE_ENDPOS(je_) - JBE_ENDPOS((&(je_))[-1]))
@@ -98,7 +98,7 @@
typedef struct JsonbPair JsonbPair;
typedef struct JsonbValue JsonbValue;
-typedef char* JsonbSuperHeader;
+typedef char *JsonbSuperHeader;
/*
* Jsonbs are varlena objects, so must meet the varlena convention that the
@@ -128,19 +128,19 @@ typedef struct
* have one per element.
*
* The position offset points to the _end_ so that we can get the length by
- * subtraction from the previous entry. The JENTRY_ISFIRST flag indicates if
+ * subtraction from the previous entry. The JENTRY_ISFIRST flag indicates if
* there is a previous entry.
*/
typedef struct
{
- uint32 header; /* Shares some flags with superheader */
-} JEntry;
+ uint32 header; /* Shares some flags with superheader */
+} JEntry;
#define IsAJsonbScalar(jsonbval) ((jsonbval)->type >= jbvNull && \
(jsonbval)->type <= jbvBool)
/*
- * JsonbValue: In-memory representation of Jsonb. This is a convenient
+ * JsonbValue: In-memory representation of Jsonb. This is a convenient
* deserialized representation, that can easily support using the "val"
* union across underlying types during manipulation. The Jsonb on-disk
* representation has various alignment considerations.
@@ -159,40 +159,39 @@ struct JsonbValue
jbvObject,
/* Binary (i.e. struct Jsonb) jbvArray/jbvObject */
jbvBinary
- } type; /* Influences sort order */
+ } type; /* Influences sort order */
- int estSize; /* Estimated size of node (including
- * subnodes) */
+ int estSize; /* Estimated size of node (including subnodes) */
union
{
- Numeric numeric;
+ Numeric numeric;
bool boolean;
struct
{
int len;
- char *val; /* Not necessarily null-terminated */
- } string; /* String primitive type */
+ char *val; /* Not necessarily null-terminated */
+ } string; /* String primitive type */
struct
{
int nElems;
JsonbValue *elems;
- bool rawScalar; /* Top-level "raw scalar" array? */
- } array; /* Array container type */
+ bool rawScalar; /* Top-level "raw scalar" array? */
+ } array; /* Array container type */
struct
{
- int nPairs; /* 1 pair, 2 elements */
+ int nPairs; /* 1 pair, 2 elements */
JsonbPair *pairs;
- } object; /* Associative container type */
+ } object; /* Associative container type */
struct
{
int len;
char *data;
- } binary;
- } val;
+ } binary;
+ } val;
};
/*
@@ -236,11 +235,11 @@ typedef struct JsonbIterator
char *buffer;
/* Current value */
- uint32 containerType; /* Never of value JB_FSCALAR, since
- * scalars will appear in pseudo-arrays */
- uint32 nElems; /* Number of elements in metaArray
- * (will be nPairs for objects) */
- bool isScalar; /* Pseudo-array scalar value? */
+ uint32 containerType; /* Never of value JB_FSCALAR, since scalars
+ * will appear in pseudo-arrays */
+ uint32 nElems; /* Number of elements in metaArray (will be
+ * nPairs for objects) */
+ bool isScalar; /* Pseudo-array scalar value? */
JEntry *meta;
/* Current item in buffer (up to nElems, but must * 2 for objects) */
@@ -287,6 +286,7 @@ extern Datum gin_extract_jsonb(PG_FUNCTION_ARGS);
extern Datum gin_extract_jsonb_query(PG_FUNCTION_ARGS);
extern Datum gin_consistent_jsonb(PG_FUNCTION_ARGS);
extern Datum gin_triconsistent_jsonb(PG_FUNCTION_ARGS);
+
/* GIN hash opclass functions */
extern Datum gin_extract_jsonb_hash(PG_FUNCTION_ARGS);
extern Datum gin_extract_jsonb_query_hash(PG_FUNCTION_ARGS);
@@ -294,27 +294,27 @@ extern Datum gin_consistent_jsonb_hash(PG_FUNCTION_ARGS);
extern Datum gin_triconsistent_jsonb_hash(PG_FUNCTION_ARGS);
/* Support functions */
-extern int compareJsonbSuperHeaderValue(JsonbSuperHeader a,
- JsonbSuperHeader b);
+extern int compareJsonbSuperHeaderValue(JsonbSuperHeader a,
+ JsonbSuperHeader b);
extern JsonbValue *findJsonbValueFromSuperHeader(JsonbSuperHeader sheader,
- uint32 flags,
- uint32 *lowbound,
- JsonbValue *key);
+ uint32 flags,
+ uint32 *lowbound,
+ JsonbValue *key);
extern JsonbValue *getIthJsonbValueFromSuperHeader(JsonbSuperHeader sheader,
- uint32 i);
-extern JsonbValue *pushJsonbValue(JsonbParseState ** pstate, int seq,
- JsonbValue *scalarVal);
+ uint32 i);
+extern JsonbValue *pushJsonbValue(JsonbParseState **pstate, int seq,
+ JsonbValue *scalarVal);
extern JsonbIterator *JsonbIteratorInit(JsonbSuperHeader buffer);
extern int JsonbIteratorNext(JsonbIterator **it, JsonbValue *val,
- bool skipNested);
+ bool skipNested);
extern Jsonb *JsonbValueToJsonb(JsonbValue *val);
-extern bool JsonbDeepContains(JsonbIterator ** val,
- JsonbIterator ** mContained);
+extern bool JsonbDeepContains(JsonbIterator **val,
+ JsonbIterator **mContained);
extern JsonbValue *arrayToJsonbSortedArray(ArrayType *a);
-extern void JsonbHashScalarValue(const JsonbValue * scalarVal, uint32 * hash);
+extern void JsonbHashScalarValue(const JsonbValue *scalarVal, uint32 *hash);
/* jsonb.c support function */
extern char *JsonbToCString(StringInfo out, JsonbSuperHeader in,
- int estimated_len);
+ int estimated_len);
#endif /* __JSONB_H__ */
diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h
index 16b250b1f64..59d0aecfbbc 100644
--- a/src/include/utils/memutils.h
+++ b/src/include/utils/memutils.h
@@ -49,8 +49,8 @@
* All chunks allocated by any memory context manager are required to be
* preceded by a StandardChunkHeader at a spacing of STANDARDCHUNKHEADERSIZE.
* A currently-allocated chunk must contain a backpointer to its owning
- * context as well as the allocated size of the chunk. The backpointer is
- * used by pfree() and repalloc() to find the context to call. The allocated
+ * context as well as the allocated size of the chunk. The backpointer is
+ * used by pfree() and repalloc() to find the context to call. The allocated
* size is not absolutely essential, but it's expected to be needed by any
* reasonable implementation.
*/
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index d99be84e2dc..999bfbe75f0 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -6,9 +6,9 @@
* This file contains the basic memory allocation interface that is
* needed by almost every backend module. It is included directly by
* postgres.h, so the definitions here are automatically available
- * everywhere. Keep it lean!
+ * everywhere. Keep it lean!
*
- * Memory allocation occurs within "contexts". Every chunk obtained from
+ * Memory allocation occurs within "contexts". Every chunk obtained from
* palloc()/MemoryContextAlloc() is allocated within a specific context.
* The entire contents of a context can be freed easily and quickly by
* resetting or deleting the context --- this is both faster and less
@@ -29,7 +29,7 @@
#define PALLOC_H
/*
- * Type MemoryContextData is declared in nodes/memnodes.h. Most users
+ * Type MemoryContextData is declared in nodes/memnodes.h. Most users
* of memory allocation should just treat it as an abstract type, so we
* do not provide the struct contents here.
*/
@@ -107,9 +107,11 @@ extern char *pstrdup(const char *in);
extern char *pnstrdup(const char *in, Size len);
/* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...)
+extern char *
+psprintf(const char *fmt,...)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
-extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
+extern size_t
+pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 0)));
#endif /* PALLOC_H */
diff --git a/src/include/utils/pg_crc.h b/src/include/utils/pg_crc.h
index b37e94eba28..375c405da5f 100644
--- a/src/include/utils/pg_crc.h
+++ b/src/include/utils/pg_crc.h
@@ -72,7 +72,7 @@ extern CRCDLLIMPORT const uint32 pg_crc32_table[];
/*
* crc0 represents the LSBs of the 64-bit value, crc1 the MSBs. Note that
* with crc0 placed first, the output of 32-bit and 64-bit implementations
- * will be bit-compatible only on little-endian architectures. If it were
+ * will be bit-compatible only on little-endian architectures. If it were
* important to make the two possible implementations bit-compatible on
* all machines, we could do a configure test to decide how to order the
* two fields, but it seems not worth the trouble.
diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h
index b8ca6432932..cfbfaa26cc3 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
@@ -61,15 +61,15 @@
* allows the query tree to be discarded easily when it is invalidated.
*
* Some callers wish to use the CachedPlan API even with one-shot queries
- * that have no reason to be saved at all. We therefore support a "oneshot"
- * variant that does no data copying or invalidation checking. In this case
+ * that have no reason to be saved at all. We therefore support a "oneshot"
+ * variant that does no data copying or invalidation checking. In this case
* there are no separate memory contexts: the CachedPlanSource struct and
* all subsidiary data live in the caller's CurrentMemoryContext, and there
- * is no way to free memory short of clearing that entire context. A oneshot
+ * is no way to free memory short of clearing that entire context. A oneshot
* plan is always treated as unsaved.
*
* Note: the string referenced by commandTag is not subsidiary storage;
- * it is assumed to be a compile-time-constant string. As with portals,
+ * it is assumed to be a compile-time-constant string. As with portals,
* commandTag shall be NULL if and only if the original query string (before
* rewriting) was an empty string.
*/
@@ -114,7 +114,7 @@ typedef struct 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. (However,
* if is_oneshot is true, the context does not belong solely to the CachedPlan
diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h
index 0506bdee15b..0b15dd28a1d 100644
--- a/src/include/utils/portal.h
+++ b/src/include/utils/portal.h
@@ -58,8 +58,8 @@
* single result from the user's viewpoint. However, the rule rewriter
* may expand the single source query to zero or many actual queries.)
*
- * PORTAL_ONE_SELECT: the portal contains one single SELECT query. We run
- * the Executor incrementally as results are demanded. This strategy also
+ * PORTAL_ONE_SELECT: the portal contains one single SELECT query. We run
+ * the Executor incrementally as results are demanded. This strategy also
* supports holdable cursors (the Executor results can be dumped into a
* tuplestore for access after transaction completion).
*
@@ -73,7 +73,7 @@
* all the auxiliary queries.)
*
* PORTAL_ONE_MOD_WITH: the portal contains one single SELECT query, but
- * it has data-modifying CTEs. This is currently treated the same as the
+ * it has data-modifying CTEs. This is currently treated the same as the
* PORTAL_ONE_RETURNING case because of the possibility of needing to fire
* triggers. It may act more like PORTAL_ONE_SELECT in future.
*
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index c87dadc0ebd..4d73700185c 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -112,11 +112,11 @@ typedef struct RelationData
TriggerDesc *trigdesc; /* Trigger info, or NULL if rel has none */
/*
- * The index chosen as the relation's replication identity or
- * InvalidOid. Only set correctly if RelationGetIndexList has been
+ * The index chosen as the relation's replication identity or InvalidOid.
+ * Only set correctly if RelationGetIndexList has been
* called/rd_indexvalid > 0.
*/
- Oid rd_replidindex;
+ Oid rd_replidindex;
/*
* rd_options is set whenever rd_rel is loaded into the relcache entry.
@@ -142,7 +142,7 @@ typedef struct RelationData
* Note: rd_amcache is available for index AMs to cache private data about
* an index. This must be just a cache since it may get reset at any time
* (in particular, it will get reset by a relcache inval message for the
- * index). If used, it must point to a single memory chunk palloc'd in
+ * index). If used, it must point to a single memory chunk palloc'd in
* rd_indexcxt. A relcache reset will include freeing that chunk and
* setting rd_amcache = NULL.
*/
@@ -165,7 +165,7 @@ typedef struct RelationData
* foreign-table support
*
* rd_fdwroutine must point to a single memory chunk palloc'd in
- * CacheMemoryContext. It will be freed and reset to NULL on a relcache
+ * CacheMemoryContext. It will be freed and reset to NULL on a relcache
* reset.
*/
@@ -220,7 +220,8 @@ typedef struct StdRdOptions
AutoVacOpts autovacuum; /* autovacuum-related options */
bool security_barrier; /* for views */
int check_option_offset; /* for views */
- bool user_catalog_table; /* use as an additional catalog relation */
+ bool user_catalog_table; /* use as an additional catalog
+ * relation */
} StdRdOptions;
#define HEAP_MIN_FILLFACTOR 10
@@ -274,7 +275,7 @@ typedef struct StdRdOptions
((relation)->rd_options && \
((StdRdOptions *) (relation)->rd_options)->check_option_offset != 0 ? \
strcmp((char *) (relation)->rd_options + \
- ((StdRdOptions *) (relation)->rd_options)->check_option_offset, \
+ ((StdRdOptions *) (relation)->rd_options)->check_option_offset, \
"local") == 0 : false)
/*
@@ -286,13 +287,13 @@ typedef struct StdRdOptions
((relation)->rd_options && \
((StdRdOptions *) (relation)->rd_options)->check_option_offset != 0 ? \
strcmp((char *) (relation)->rd_options + \
- ((StdRdOptions *) (relation)->rd_options)->check_option_offset, \
+ ((StdRdOptions *) (relation)->rd_options)->check_option_offset, \
"cascaded") == 0 : false)
/*
* RelationIsUsedAsCatalogTable
* Returns whether the relation should be treated as a catalog table
- * from the pov of logical decoding.
+ * from the pov of logical decoding.
*/
#define RelationIsUsedAsCatalogTable(relation) \
((relation)->rd_options ? \
@@ -398,7 +399,7 @@ typedef struct StdRdOptions
* RelationGetTargetBlock
* Fetch relation's current insertion target block.
*
- * Returns InvalidBlockNumber if there is no current target block. Note
+ * Returns InvalidBlockNumber if there is no current target block. Note
* that the target block status is discarded on any smgr-level invalidation.
*/
#define RelationGetTargetBlock(relation) \
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h
index 31f4878f998..3e1c1385a4d 100644
--- a/src/include/utils/relcache.h
+++ b/src/include/utils/relcache.h
@@ -23,7 +23,7 @@ typedef struct RelationData *Relation;
/* ----------------
* RelationPtr is used in the executor to support index scans
* where we have to keep track of several index relations in an
- * array. -cim 9/10/89
+ * array. -cim 9/10/89
* ----------------
*/
typedef Relation *RelationPtr;
@@ -50,7 +50,7 @@ typedef enum IndexAttrBitmapKind
} IndexAttrBitmapKind;
extern Bitmapset *RelationGetIndexAttrBitmap(Relation relation,
- IndexAttrBitmapKind keyAttrs);
+ IndexAttrBitmapKind keyAttrs);
extern void RelationGetExclusionInfo(Relation indexRelation,
Oid **operators,
diff --git a/src/include/utils/relfilenodemap.h b/src/include/utils/relfilenodemap.h
index c20c60437ad..a98791d8a36 100644
--- a/src/include/utils/relfilenodemap.h
+++ b/src/include/utils/relfilenodemap.h
@@ -13,6 +13,6 @@
#ifndef RELFILENODEMAP_H
#define RELFILENODEMAP_H
-extern Oid RelidByRelfilenode(Oid reltablespace, Oid relfilenode);
+extern Oid RelidByRelfilenode(Oid reltablespace, Oid relfilenode);
#endif /* RELFILENODEMAP_H */
diff --git a/src/include/utils/resowner.h b/src/include/utils/resowner.h
index c6f21c9d5c2..e448e911a63 100644
--- a/src/include/utils/resowner.h
+++ b/src/include/utils/resowner.h
@@ -36,7 +36,7 @@ extern PGDLLIMPORT ResourceOwner TopTransactionResourceOwner;
/*
* Resource releasing is done in three phases: pre-locks, locks, and
- * post-locks. The pre-lock phase must release any resources that are
+ * post-locks. The pre-lock phase must release any resources that are
* visible to other backends (such as pinned buffers); this ensures that
* when we release a lock that another backend may be waiting on, it will
* see us as being fully out of our transaction. The post-lock phase
diff --git a/src/include/utils/resowner_private.h b/src/include/utils/resowner_private.h
index 6015d74f149..b8fd1a9221f 100644
--- a/src/include/utils/resowner_private.h
+++ b/src/include/utils/resowner_private.h
@@ -84,8 +84,8 @@ extern void ResourceOwnerForgetFile(ResourceOwner owner,
/* support for dynamic shared memory management */
extern void ResourceOwnerEnlargeDSMs(ResourceOwner owner);
extern void ResourceOwnerRememberDSM(ResourceOwner owner,
- dsm_segment *);
+ dsm_segment *);
extern void ResourceOwnerForgetDSM(ResourceOwner owner,
- dsm_segment *);
+ dsm_segment *);
#endif /* RESOWNER_PRIVATE_H */
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
index fb740313d0a..0f662ec8bb4 100644
--- a/src/include/utils/selfuncs.h
+++ b/src/include/utils/selfuncs.h
@@ -23,7 +23,7 @@
/*
* Note: the default selectivity estimates are not chosen entirely at random.
* We want them to be small enough to ensure that indexscans will be used if
- * available, for typical table densities of ~100 tuples/page. Thus, for
+ * available, for typical table densities of ~100 tuples/page. Thus, for
* example, 0.01 is not quite small enough, since that makes it appear that
* nearly all pages will be hit anyway. Also, since we sometimes estimate
* eqsel as 1/num_distinct, we probably want DEFAULT_NUM_DISTINCT to equal
diff --git a/src/include/utils/snapshot.h b/src/include/utils/snapshot.h
index 8ee9285c55b..d8e8b351ed2 100644
--- a/src/include/utils/snapshot.h
+++ b/src/include/utils/snapshot.h
@@ -28,7 +28,7 @@ typedef struct SnapshotData *Snapshot;
* function.
*/
typedef bool (*SnapshotSatisfiesFunc) (HeapTuple htup,
- Snapshot snapshot, Buffer buffer);
+ Snapshot snapshot, Buffer buffer);
/*
* Struct representing all kind of possible snapshots.
@@ -39,7 +39,7 @@ typedef bool (*SnapshotSatisfiesFunc) (HeapTuple htup,
* * Historic MVCC snapshots used during logical decoding
* * snapshots passed to HeapTupleSatisfiesDirty()
* * snapshots used for SatisfiesAny, Toast, Self where no members are
- * accessed.
+ * accessed.
*
* TODO: It's probably a good idea to split this struct using a NodeTag
* similar to how parser and executor nodes are handled, with one type for
@@ -62,16 +62,18 @@ typedef struct SnapshotData
*/
TransactionId xmin; /* all XID < xmin are visible to me */
TransactionId xmax; /* all XID >= xmax are invisible to me */
+
/*
* For normal MVCC snapshot this contains the all xact IDs that are in
* progress, unless the snapshot was taken during recovery in which case
- * it's empty. For historic MVCC snapshots, the meaning is inverted,
- * i.e. it contains *committed* transactions between xmin and xmax.
+ * it's empty. For historic MVCC snapshots, the meaning is inverted, i.e.
+ * it contains *committed* transactions between xmin and xmax.
*/
TransactionId *xip;
uint32 xcnt; /* # of xact ids in xip[] */
/* note: all ids in xip[] satisfy xmin <= xip[i] < xmax */
int32 subxcnt; /* # of xact ids in subxip[] */
+
/*
* For non-historic MVCC snapshots, this contains subxact IDs that are in
* progress (and other transactions that are in progress if taken during
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h
index 13d3fbee718..8b6b0de2e8b 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.
*
*
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h
index 48abe62983d..ae285c3ed5f 100644
--- a/src/include/utils/tqual.h
+++ b/src/include/utils/tqual.h
@@ -3,7 +3,7 @@
* tqual.h
* POSTGRES "time qualification" definitions, ie, tuple visibility rules.
*
- * Should be moved/renamed... - vadim 07/28/98
+ * Should be moved/renamed... - vadim 07/28/98
*
* Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
@@ -76,7 +76,7 @@ extern bool HeapTupleSatisfiesToast(HeapTuple htup,
extern bool HeapTupleSatisfiesDirty(HeapTuple htup,
Snapshot snapshot, Buffer buffer);
extern bool HeapTupleSatisfiesHistoricMVCC(HeapTuple htup,
- Snapshot snapshot, Buffer buffer);
+ Snapshot snapshot, Buffer buffer);
/* Special "satisfies" routines with different APIs */
extern HTSU_Result HeapTupleSatisfiesUpdate(HeapTuple htup,
@@ -95,8 +95,8 @@ extern bool HeapTupleHeaderIsOnlyLocked(HeapTupleHeader tuple);
* details this is implemented in reorderbuffer.c not tqual.c.
*/
extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data,
- Snapshot snapshot,
- HeapTuple htup,
- Buffer buffer,
- CommandId *cmin, CommandId *cmax);
+ Snapshot snapshot,
+ HeapTuple htup,
+ Buffer buffer,
+ CommandId *cmin, CommandId *cmax);
#endif /* TQUAL_H */
diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h
index 05445f049c2..7d828e064bf 100644
--- a/src/include/utils/tuplesort.h
+++ b/src/include/utils/tuplesort.h
@@ -6,7 +6,7 @@
* This module handles sorting of heap tuples, index tuples, or single
* Datums (and could easily support other kinds of sortable objects,
* if necessary). It works efficiently for both small and large amounts
- * of data. Small amounts are sorted in-memory using qsort(). Large
+ * of data. Small amounts are sorted in-memory using qsort(). Large
* amounts are sorted using temporary files and a standard external sort
* algorithm.
*
@@ -41,9 +41,9 @@ typedef struct Tuplesortstate Tuplesortstate;
* The "heap" API actually stores/sorts MinimalTuples, which means it doesn't
* preserve the system columns (tuple identity and transaction visibility
* info). The sort keys are specified by column numbers within the tuples
- * and sort operator OIDs. We save some cycles by passing and returning the
+ * and sort operator OIDs. We save some cycles by passing and returning the
* tuples in TupleTableSlots, rather than forming actual HeapTuples (which'd
- * have to be converted to MinimalTuples). This API works well for sorts
+ * have to be converted to MinimalTuples). This API works well for sorts
* executed as parts of plan trees.
*
* The "cluster" API stores/sorts full HeapTuples including all visibility
@@ -52,7 +52,7 @@ typedef struct Tuplesortstate Tuplesortstate;
* go with this API, not the "begin_heap" one!
*
* The "index_btree" API stores/sorts IndexTuples (preserving all their
- * header fields). The sort keys are specified by a btree index definition.
+ * header fields). The sort keys are specified by a btree index definition.
*
* The "index_hash" API is similar to index_btree, but the tuples are
* actually sorted by their hash codes not the raw data.
diff --git a/src/include/utils/tuplestore.h b/src/include/utils/tuplestore.h
index 16eca871cd1..e4adc936894 100644
--- a/src/include/utils/tuplestore.h
+++ b/src/include/utils/tuplestore.h
@@ -8,7 +8,7 @@
* a dumbed-down version of tuplesort.c; it does no sorting of tuples
* but can only store and regurgitate a sequence of tuples. However,
* because no sort is required, it is allowed to start reading the sequence
- * before it has all been written. This is particularly useful for cursors,
+ * before it has all been written. This is particularly useful for cursors,
* because it allows random access within the already-scanned portion of
* a query without having to process the underlying scan to completion.
* Also, it is possible to support multiple independent read pointers.
diff --git a/src/include/utils/typcache.h b/src/include/utils/typcache.h
index b47a5707046..ae1fc9c6323 100644
--- a/src/include/utils/typcache.h
+++ b/src/include/utils/typcache.h
@@ -56,7 +56,7 @@ typedef struct TypeCacheEntry
/*
* Pre-set-up fmgr call info for the equality operator, the btree
- * comparison function, and the hash calculation function. These are kept
+ * comparison function, and the hash calculation function. These are kept
* in the type cache to avoid problems with memory leaks in repeated calls
* to functions such as array_eq, array_cmp, hash_array. There is not
* currently a need to maintain call info for the lt_opr or gt_opr.
@@ -73,7 +73,7 @@ typedef struct TypeCacheEntry
TupleDesc tupDesc;
/*
- * Fields computed when TYPECACHE_RANGE_INFO is requested. Zeroes if not
+ * 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.
@@ -88,7 +88,7 @@ typedef struct TypeCacheEntry
int flags; /* flags about what we've computed */
/*
- * Private information about an enum type. NULL if not enum or
+ * Private information about an enum type. NULL if not enum or
* information hasn't been requested.
*/
struct TypeCacheEnumData *enumData;