summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:18:54 +0000
committerTom Lane2017-06-21 19:19:25 +0000
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /contrib
parentf669c09989bda894d6ba01634ccb229f0687c08a (diff)
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bloom/bloom.h6
-rw-r--r--contrib/btree_gist/btree_utils_num.h14
-rw-r--r--contrib/btree_gist/btree_utils_var.c2
-rw-r--r--contrib/btree_gist/btree_utils_var.h2
-rw-r--r--contrib/btree_gist/btree_uuid.c2
-rw-r--r--contrib/cube/cubedata.h8
-rw-r--r--contrib/dblink/dblink.c4
-rw-r--r--contrib/file_fdw/file_fdw.c8
-rw-r--r--contrib/fuzzystrmatch/dmetaphone.c8
-rw-r--r--contrib/hstore/hstore.h4
-rw-r--r--contrib/hstore/hstore_io.c2
-rw-r--r--contrib/intarray/_int.h2
-rw-r--r--contrib/intarray/_int_tool.c2
-rw-r--r--contrib/isn/isn.c14
-rw-r--r--contrib/isn/isn.h2
-rw-r--r--contrib/lo/lo.c4
-rw-r--r--contrib/ltree/ltree.h2
-rw-r--r--contrib/ltree/ltree_gist.c4
-rw-r--r--contrib/pageinspect/pageinspect.h2
-rw-r--r--contrib/pg_buffercache/pg_buffercache_pages.c2
-rw-r--r--contrib/pg_standby/pg_standby.c10
-rw-r--r--contrib/pg_stat_statements/pg_stat_statements.c20
-rw-r--r--contrib/pg_trgm/trgm.h2
-rw-r--r--contrib/pg_trgm/trgm_regexp.c4
-rw-r--r--contrib/pgcrypto/crypt-des.c2
-rw-r--r--contrib/pgcrypto/imath.c20
-rw-r--r--contrib/pgcrypto/imath.h28
-rw-r--r--contrib/pgcrypto/internal.c4
-rw-r--r--contrib/pgcrypto/mbuf.h2
-rw-r--r--contrib/pgcrypto/md5.h2
-rw-r--r--contrib/pgcrypto/pgp.h4
-rw-r--r--contrib/pgcrypto/px-crypt.h2
-rw-r--r--contrib/pgcrypto/px.h4
-rw-r--r--contrib/pgcrypto/rijndael.c4
-rw-r--r--contrib/pgcrypto/rijndael.h2
-rw-r--r--contrib/pgcrypto/sha1.h2
-rw-r--r--contrib/pgstattuple/pgstatindex.c2
-rw-r--r--contrib/postgres_fdw/option.c4
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c20
-rw-r--r--contrib/postgres_fdw/postgres_fdw.h2
-rw-r--r--contrib/sepgsql/label.c8
-rw-r--r--contrib/sepgsql/sepgsql.h2
-rw-r--r--contrib/spi/refint.c2
-rw-r--r--contrib/spi/timetravel.c2
-rw-r--r--contrib/tablefunc/tablefunc.c4
-rw-r--r--contrib/tablefunc/tablefunc.h2
-rw-r--r--contrib/tcn/tcn.c4
-rw-r--r--contrib/uuid-ossp/uuid-ossp.c4
-rw-r--r--contrib/xml2/xpath.c12
-rw-r--r--contrib/xml2/xslt_proc.c8
50 files changed, 141 insertions, 141 deletions
diff --git a/contrib/bloom/bloom.h b/contrib/bloom/bloom.h
index 0cfe49aad82..6d1b3f12a3b 100644
--- a/contrib/bloom/bloom.h
+++ b/contrib/bloom/bloom.h
@@ -75,7 +75,7 @@ typedef BloomPageOpaqueData *BloomPageOpaque;
/* Preserved page numbers */
#define BLOOM_METAPAGE_BLKNO (0)
-#define BLOOM_HEAD_BLKNO (1) /* first data page */
+#define BLOOM_HEAD_BLKNO (1) /* first data page */
/*
* We store Bloom signatures as arrays of uint16 words.
@@ -101,8 +101,8 @@ typedef struct BloomOptions
{
int32 vl_len_; /* varlena header (do not touch directly!) */
int bloomLength; /* length of signature in words (not bits!) */
- int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for
- * each index key */
+ int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for each
+ * index key */
} BloomOptions;
/*
diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h
index 8aab19396c4..17561fa9e4e 100644
--- a/contrib/btree_gist/btree_utils_num.h
+++ b/contrib/btree_gist/btree_utils_num.h
@@ -42,13 +42,13 @@ typedef struct
/* Methods */
- bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */
- bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */
- bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */
- bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */
- bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */
- int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */
- float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */
+ bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */
+ bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */
+ bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */
+ bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */
+ bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */
+ int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */
+ float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */
} gbtree_ninfo;
diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c
index c531663f927..b2623a95830 100644
--- a/contrib/btree_gist/btree_utils_var.c
+++ b/contrib/btree_gist/btree_utils_var.c
@@ -488,7 +488,7 @@ gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
cur = (char *) DatumGetPointer(entryvec->vector[i].key);
ro = gbt_var_key_readable((GBT_VARKEY *) cur);
- if (ro.lower == ro.upper) /* leaf */
+ if (ro.lower == ro.upper) /* leaf */
{
sv[svcntr] = gbt_var_leaf2node((GBT_VARKEY *) cur, tinfo, flinfo);
arr[i].t = sv[svcntr];
diff --git a/contrib/btree_gist/btree_utils_var.h b/contrib/btree_gist/btree_utils_var.h
index 04a356276bf..15d847c1394 100644
--- a/contrib/btree_gist/btree_utils_var.h
+++ b/contrib/btree_gist/btree_utils_var.h
@@ -40,7 +40,7 @@ typedef struct
bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */
bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */
int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */
- GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
+ GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
} gbtree_vinfo;
diff --git a/contrib/btree_gist/btree_uuid.c b/contrib/btree_gist/btree_uuid.c
index e67b8cc9898..58a87decc64 100644
--- a/contrib/btree_gist/btree_uuid.c
+++ b/contrib/btree_gist/btree_uuid.c
@@ -171,7 +171,7 @@ static double
uuid_2_double(const pg_uuid_t *u)
{
uint64 uu[2];
- const double two64 = 18446744073709551616.0; /* 2^64 */
+ const double two64 = 18446744073709551616.0; /* 2^64 */
/* Source data may not be suitably aligned, so copy */
memcpy(uu, u->data, UUID_LEN);
diff --git a/contrib/cube/cubedata.h b/contrib/cube/cubedata.h
index af02464178c..6e6ddfd3d75 100644
--- a/contrib/cube/cubedata.h
+++ b/contrib/cube/cubedata.h
@@ -54,10 +54,10 @@ typedef struct NDBOX
#define PG_RETURN_NDBOX(x) PG_RETURN_POINTER(x)
/* GiST operator strategy numbers */
-#define CubeKNNDistanceCoord 15 /* ~> */
-#define CubeKNNDistanceTaxicab 16 /* <#> */
-#define CubeKNNDistanceEuclid 17 /* <-> */
-#define CubeKNNDistanceChebyshev 18 /* <=> */
+#define CubeKNNDistanceCoord 15 /* ~> */
+#define CubeKNNDistanceTaxicab 16 /* <#> */
+#define CubeKNNDistanceEuclid 17 /* <-> */
+#define CubeKNNDistanceChebyshev 18 /* <=> */
/* in cubescan.l */
extern int cube_yylex(void);
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index f2182bc3f4a..5ec3e794a20 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -67,7 +67,7 @@ typedef struct remoteConn
{
PGconn *conn; /* Hold the remote connection */
int openCursorCount; /* The number of open cursors */
- bool newXactForCursor; /* Opened a transaction for a cursor */
+ bool newXactForCursor; /* Opened a transaction for a cursor */
} remoteConn;
typedef struct storeInfo
@@ -1098,7 +1098,7 @@ storeQueryResult(volatile storeInfo *sinfo, PGconn *conn, const char *sql)
if (!PQsendQuery(conn, sql))
elog(ERROR, "could not send query: %s", pchomp(PQerrorMessage(conn)));
- if (!PQsetSingleRowMode(conn)) /* shouldn't fail */
+ if (!PQsetSingleRowMode(conn)) /* shouldn't fail */
elog(ERROR, "failed to set single-row mode for dblink query");
for (;;)
diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c
index 277639f6e9d..692c7ce5f1d 100644
--- a/contrib/file_fdw/file_fdw.c
+++ b/contrib/file_fdw/file_fdw.c
@@ -544,13 +544,13 @@ fileGetForeignPaths(PlannerInfo *root,
*/
add_path(baserel, (Path *)
create_foreignscan_path(root, baserel,
- NULL, /* default pathtarget */
+ NULL, /* default pathtarget */
baserel->rows,
startup_cost,
total_cost,
- NIL, /* no pathkeys */
- NULL, /* no outer rel either */
- NULL, /* no extra plan */
+ NIL, /* no pathkeys */
+ NULL, /* no outer rel either */
+ NULL, /* no extra plan */
coptions));
/*
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c
index 4e89983afda..918ee0d90e5 100644
--- a/contrib/fuzzystrmatch/dmetaphone.c
+++ b/contrib/fuzzystrmatch/dmetaphone.c
@@ -111,7 +111,7 @@ The remaining code is authored by Andrew Dunstan <[email protected]> and
#include <string.h>
#include <stdarg.h>
-#endif /* DMETAPHONE_MAIN */
+#endif /* DMETAPHONE_MAIN */
#include <assert.h>
#include <ctype.h>
@@ -197,7 +197,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
* in a case like this.
*/
-#define META_FREE(x) ((void)true) /* pfree((x)) */
+#define META_FREE(x) ((void)true) /* pfree((x)) */
#else /* not defined DMETAPHONE_MAIN */
/* use the standard malloc library when not running in PostgreSQL */
@@ -209,7 +209,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
(v = (t*)realloc((v),((n)*sizeof(t))))
#define META_FREE(x) free((x))
-#endif /* defined DMETAPHONE_MAIN */
+#endif /* defined DMETAPHONE_MAIN */
@@ -977,7 +977,7 @@ DoubleMetaphone(char *str, char **codes)
}
}
- if (GetAt(original, current + 1) == 'J') /* it could happen! */
+ if (GetAt(original, current + 1) == 'J') /* it could happen! */
current += 2;
else
current += 1;
diff --git a/contrib/hstore/hstore.h b/contrib/hstore/hstore.h
index 6bab08b7de0..c4862a82e17 100644
--- a/contrib/hstore/hstore.h
+++ b/contrib/hstore/hstore.h
@@ -181,7 +181,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
#define HStoreExistsStrategyNumber 9
#define HStoreExistsAnyStrategyNumber 10
#define HStoreExistsAllStrategyNumber 11
-#define HStoreOldContainsStrategyNumber 13 /* backwards compatibility */
+#define HStoreOldContainsStrategyNumber 13 /* backwards compatibility */
/*
* defining HSTORE_POLLUTE_NAMESPACE=0 will prevent use of old function names;
@@ -202,4 +202,4 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
extern int no_such_variable
#endif
-#endif /* __HSTORE_H__ */
+#endif /* __HSTORE_H__ */
diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c
index 1cecf860048..1dd7c7c9ce4 100644
--- a/contrib/hstore/hstore_io.c
+++ b/contrib/hstore/hstore_io.c
@@ -829,7 +829,7 @@ hstore_from_record(PG_FUNCTION_ARGS)
my_extra->ncolumns = ncolumns;
}
- Assert(ncolumns <= MaxTupleAttributeNumber); /* thus, no overflow */
+ Assert(ncolumns <= MaxTupleAttributeNumber); /* thus, no overflow */
pairs = palloc(ncolumns * sizeof(Pairs));
if (rec)
diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h
index d524f0fed53..b689eb7dedf 100644
--- a/contrib/intarray/_int.h
+++ b/contrib/intarray/_int.h
@@ -173,4 +173,4 @@ int compDESC(const void *a, const void *b);
(direction) ? compASC : compDESC ); \
} while(0)
-#endif /* ___INT_H__ */
+#endif /* ___INT_H__ */
diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c
index 3c52912bbf4..2fdfd2ec632 100644
--- a/contrib/intarray/_int_tool.c
+++ b/contrib/intarray/_int_tool.c
@@ -282,7 +282,7 @@ internal_size(int *a, int len)
for (i = 0; i < len; i += 2)
{
- if (!i || a[i] != a[i - 1]) /* do not count repeated range */
+ if (!i || a[i] != a[i - 1]) /* do not count repeated range */
size += a[i + 1] - a[i] + 1;
}
diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c
index c3c10e14bca..d018ec6af5b 100644
--- a/contrib/isn/isn.c
+++ b/contrib/isn/isn.c
@@ -131,7 +131,7 @@ invalidindex:
elog(DEBUG1, "index %d is invalid", j);
return false;
}
-#endif /* ISN_DEBUG */
+#endif /* ISN_DEBUG */
/*----------------------------------------------------------
* Formatting and conversion routines.
@@ -699,11 +699,11 @@ string2ean(const char *str, bool errorOK, ean13 *result,
/* recognize and validate the number: */
while (*aux2 && length <= 13)
{
- last = (*(aux2 + 1) == '!' || *(aux2 + 1) == '\0'); /* is the last character */
+ last = (*(aux2 + 1) == '!' || *(aux2 + 1) == '\0'); /* is the last character */
digit = (isdigit((unsigned char) *aux2) != 0); /* is current character
* a digit? */
- if (*aux2 == '?' && last) /* automagically calculate check digit
- * if it's '?' */
+ if (*aux2 == '?' && last) /* automagically calculate check digit if
+ * it's '?' */
magic = digit = true;
if (length == 0 && (*aux2 == 'M' || *aux2 == 'm'))
{
@@ -832,8 +832,8 @@ string2ean(const char *str, bool errorOK, ean13 *result,
goto eanwrongtype;
break;
case ISMN:
- memcpy(buf, "9790", 4); /* this isn't for sure yet, for now
- * ISMN it's only 9790 */
+ memcpy(buf, "9790", 4); /* this isn't for sure yet, for now ISMN
+ * it's only 9790 */
valid = (valid && ((rcheck = checkdig(buf, 13)) == check || magic));
break;
case ISBN:
@@ -1123,7 +1123,7 @@ accept_weak_input(PG_FUNCTION_ARGS)
g_weak = PG_GETARG_BOOL(0);
#else
/* function has no effect */
-#endif /* ISN_WEAK_MODE */
+#endif /* ISN_WEAK_MODE */
PG_RETURN_BOOL(g_weak);
}
diff --git a/contrib/isn/isn.h b/contrib/isn/isn.h
index 09dc7c65759..e2c8a262346 100644
--- a/contrib/isn/isn.h
+++ b/contrib/isn/isn.h
@@ -32,4 +32,4 @@ typedef uint64 ean13;
extern void initialize(void);
-#endif /* ISN_H */
+#endif /* ISN_H */
diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c
index 6bd24309319..4585923ee2b 100644
--- a/contrib/lo/lo.c
+++ b/contrib/lo/lo.c
@@ -32,11 +32,11 @@ lo_manage(PG_FUNCTION_ARGS)
HeapTuple newtuple; /* The new value for tuple */
HeapTuple trigtuple; /* The original value of tuple */
- if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
+ if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
elog(ERROR, "%s: not fired by trigger manager",
trigdata->tg_trigger->tgname);
- if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */
+ if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */
elog(ERROR, "%s: must be fired for row",
trigdata->tg_trigger->tgname);
diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h
index c604357dbfb..7a7a1540976 100644
--- a/contrib/ltree/ltree.h
+++ b/contrib/ltree/ltree.h
@@ -125,7 +125,7 @@ typedef struct
#define OPR 3
#define OPEN 4
#define CLOSE 5
-#define VALTRUE 6 /* for stop words */
+#define VALTRUE 6 /* for stop words */
#define VALFALSE 7
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
index 033a477c61a..37ee3377ff3 100644
--- a/contrib/ltree/ltree_gist.c
+++ b/contrib/ltree/ltree_gist.c
@@ -302,7 +302,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j))
{
array[j].index = j;
- lu = GETENTRY(entryvec, j); /* use as tmp val */
+ lu = GETENTRY(entryvec, j); /* use as tmp val */
array[j].r = LTG_GETLNODE(lu);
}
@@ -312,7 +312,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
lu_l = lu_r = ru_l = ru_r = NULL;
for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j))
{
- lu = GETENTRY(entryvec, array[j].index); /* use as tmp val */
+ lu = GETENTRY(entryvec, array[j].index); /* use as tmp val */
if (j <= (maxoff - FirstOffsetNumber + 1) / 2)
{
v->spl_left[v->spl_nleft] = array[j].index;
diff --git a/contrib/pageinspect/pageinspect.h b/contrib/pageinspect/pageinspect.h
index 55ca68fab36..f49cf9e8923 100644
--- a/contrib/pageinspect/pageinspect.h
+++ b/contrib/pageinspect/pageinspect.h
@@ -18,4 +18,4 @@
/* in rawpage.c */
extern Page get_page_from_raw(bytea *raw_page);
-#endif /* _PAGEINSPECT_H_ */
+#endif /* _PAGEINSPECT_H_ */
diff --git a/contrib/pg_buffercache/pg_buffercache_pages.c b/contrib/pg_buffercache/pg_buffercache_pages.c
index 8bebf2384df..b410aafa5a9 100644
--- a/contrib/pg_buffercache/pg_buffercache_pages.c
+++ b/contrib/pg_buffercache/pg_buffercache_pages.c
@@ -66,7 +66,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
FuncCallContext *funcctx;
Datum result;
MemoryContext oldcontext;
- BufferCachePagesContext *fctx; /* User function context. */
+ BufferCachePagesContext *fctx; /* User function context. */
TupleDesc tupledesc;
TupleDesc expected_tupledesc;
HeapTuple tuple;
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index c37eaa395da..db402310895 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -44,8 +44,8 @@ int maxwaittime = 0; /* how long are we prepared to wait for? */
int keepfiles = 0; /* number of WAL files to keep, 0 keep all */
int maxretries = 3; /* number of retries on restore command */
bool debug = false; /* are we debugging? */
-bool need_cleanup = false; /* do we need to remove files from
- * archive? */
+bool need_cleanup = false; /* do we need to remove files from
+ * archive? */
#ifndef WIN32
static volatile sig_atomic_t signaled = false;
@@ -59,8 +59,8 @@ char *restartWALFileName; /* the file from which we can restart restore */
char *priorWALFileName; /* the file we need to get from archive */
char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */
char restoreCommand[MAXPGPATH]; /* run this to restore */
-char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to
- * get from archive */
+char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to get
+ * from archive */
/*
* Two types of failover are supported (smart and fast failover).
@@ -582,7 +582,7 @@ main(int argc, char **argv)
* There's no way to trigger failover via signal on Windows.
*/
(void) pqsignal(SIGUSR1, sighandler);
- (void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
+ (void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
(void) pqsignal(SIGQUIT, sigquit_handler);
#endif
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 1febdca16fe..d1ed74b45e3 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -107,7 +107,7 @@ static const uint32 PGSS_PG_MAJOR_VERSION = PG_VERSION_NUM / 100;
#define ASSUMED_LENGTH_INIT 1024 /* initial assumed mean query length */
#define USAGE_DECREASE_FACTOR (0.99) /* decreased every entry_dealloc */
#define STICKY_DECREASE_FACTOR (0.50) /* factor for sticky entries */
-#define USAGE_DEALLOC_PERCENT 5 /* free this % of entries at once */
+#define USAGE_DEALLOC_PERCENT 5 /* free this % of entries at once */
#define JUMBLE_SIZE 1024 /* query serialization buffer size */
@@ -146,15 +146,15 @@ typedef struct Counters
double sum_var_time; /* sum of variances in execution time in msec */
int64 rows; /* total # of retrieved or affected rows */
int64 shared_blks_hit; /* # of shared buffer hits */
- int64 shared_blks_read; /* # of shared disk blocks read */
+ int64 shared_blks_read; /* # of shared disk blocks read */
int64 shared_blks_dirtied; /* # of shared disk blocks dirtied */
int64 shared_blks_written; /* # of shared disk blocks written */
int64 local_blks_hit; /* # of local buffer hits */
int64 local_blks_read; /* # of local disk blocks read */
- int64 local_blks_dirtied; /* # of local disk blocks dirtied */
- int64 local_blks_written; /* # of local disk blocks written */
+ int64 local_blks_dirtied; /* # of local disk blocks dirtied */
+ int64 local_blks_written; /* # of local disk blocks written */
int64 temp_blks_read; /* # of temp blocks read */
- int64 temp_blks_written; /* # of temp blocks written */
+ int64 temp_blks_written; /* # of temp blocks written */
double blk_read_time; /* time spent reading, in msec */
double blk_write_time; /* time spent writing, in msec */
double usage; /* usage factor */
@@ -183,7 +183,7 @@ typedef struct pgssEntry
typedef struct pgssSharedState
{
LWLock *lock; /* protects hashtable search/modification */
- double cur_median_usage; /* current median usage in hashtable */
+ double cur_median_usage; /* current median usage in hashtable */
Size mean_query_len; /* current mean entry text length */
slock_t mutex; /* protects following fields only: */
Size extent; /* current extent of query file */
@@ -940,7 +940,7 @@ pgss_ExecutorEnd(QueryDesc *queryDesc)
queryId,
queryDesc->plannedstmt->stmt_location,
queryDesc->plannedstmt->stmt_len,
- queryDesc->totaltime->total * 1000.0, /* convert to msec */
+ queryDesc->totaltime->total * 1000.0, /* convert to msec */
queryDesc->estate->es_processed,
&queryDesc->totaltime->bufusage,
NULL);
@@ -1337,7 +1337,7 @@ pg_stat_statements_reset(PG_FUNCTION_ARGS)
#define PG_STAT_STATEMENTS_COLS_V1_1 18
#define PG_STAT_STATEMENTS_COLS_V1_2 19
#define PG_STAT_STATEMENTS_COLS_V1_3 23
-#define PG_STAT_STATEMENTS_COLS 23 /* maximum of above */
+#define PG_STAT_STATEMENTS_COLS 23 /* maximum of above */
/*
* Retrieve statement statistics.
@@ -2967,12 +2967,12 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query,
char *norm_query;
int query_len = *query_len_p;
int i,
- norm_query_buflen, /* Space allowed for norm_query */
+ norm_query_buflen, /* Space allowed for norm_query */
len_to_wrt, /* Length (in bytes) to write */
quer_loc = 0, /* Source query byte location */
n_quer_loc = 0, /* Normalized query byte location */
last_off = 0, /* Offset from start for previous tok */
- last_tok_len = 0; /* Length (in bytes) of that tok */
+ last_tok_len = 0; /* Length (in bytes) of that tok */
/*
* Get constants' lengths (core system only gives us locations). Note
diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h
index 8cd88e763c1..45df91875ab 100644
--- a/contrib/pg_trgm/trgm.h
+++ b/contrib/pg_trgm/trgm.h
@@ -132,4 +132,4 @@ extern TRGM *createTrgmNFA(text *text_re, Oid collation,
TrgmPackedGraph **graph, MemoryContext rcontext);
extern bool trigramsMatchGraph(TrgmPackedGraph *graph, bool *check);
-#endif /* __TRGM_H__ */
+#endif /* __TRGM_H__ */
diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c
index 6ab2e49eb94..1d474e2aacd 100644
--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -450,7 +450,7 @@ struct TrgmPackedGraph
* by color trigram number.
*/
int colorTrigramsCount;
- int *colorTrigramGroups; /* array of size colorTrigramsCount */
+ int *colorTrigramGroups; /* array of size colorTrigramsCount */
/*
* The states of the simplified NFA. State number 0 is always initial
@@ -2350,4 +2350,4 @@ printTrgmPackedGraph(TrgmPackedGraph *packedGraph, TRGM *trigrams)
pfree(buf.data);
}
-#endif /* TRGM_REGEXP_DEBUG */
+#endif /* TRGM_REGEXP_DEBUG */
diff --git a/contrib/pgcrypto/crypt-des.c b/contrib/pgcrypto/crypt-des.c
index 44a5731dde0..60bdbb0c912 100644
--- a/contrib/pgcrypto/crypt-des.c
+++ b/contrib/pgcrypto/crypt-des.c
@@ -734,7 +734,7 @@ px_crypt_des(const char *key, const char *setting)
p = output + strlen(output);
}
else
-#endif /* !DISABLE_XDES */
+#endif /* !DISABLE_XDES */
{
/*
* "old"-style: setting - 2 bytes of salt key - only up to the first 8
diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c
index 41021a7ffdb..cd528bfd836 100644
--- a/contrib/pgcrypto/imath.c
+++ b/contrib/pgcrypto/imath.c
@@ -1975,7 +1975,7 @@ mp_int_string_len(mp_int z, mp_size radix)
if (radix < MP_MIN_RADIX || radix > MP_MAX_RADIX)
return MP_RANGE;
- len = s_outlen(z, radix) + 1; /* for terminator */
+ len = s_outlen(z, radix) + 1; /* for terminator */
/* Allow for sign marker on negatives */
if (MP_SIGN(z) == MP_NEG)
@@ -2512,7 +2512,7 @@ s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
/* Subtract corresponding digits and propagate borrow */
for (pos = 0; pos < size_b; ++pos, ++da, ++db, ++dc)
{
- w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
+ w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
(mp_word) *da) - w - (mp_word) *db;
*dc = LOWER_HALF(w);
@@ -2522,7 +2522,7 @@ s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
/* Finish the subtraction for remaining upper digits of da */
for ( /* */ ; pos < size_a; ++pos, ++da, ++dc)
{
- w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
+ w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
(mp_word) *da) - w;
*dc = LOWER_HALF(w);
@@ -2594,10 +2594,10 @@ s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc,
* t1 and t2 are initially used as temporaries to compute the inner
* product (a1 + a0)(b1 + b0) = a1b1 + a1b0 + a0b1 + a0b0
*/
- carry = s_uadd(da, a_top, t1, bot_size, at_size); /* t1 = a1 + a0 */
+ carry = s_uadd(da, a_top, t1, bot_size, at_size); /* t1 = a1 + a0 */
t1[bot_size] = carry;
- carry = s_uadd(db, b_top, t2, bot_size, bt_size); /* t2 = b1 + b0 */
+ carry = s_uadd(db, b_top, t2, bot_size, bt_size); /* t2 = b1 + b0 */
t2[bot_size] = carry;
(void) s_kmul(t1, t2, t3, bot_size + 1, bot_size + 1); /* t3 = t1 * t2 */
@@ -2609,7 +2609,7 @@ s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc,
ZERO(t1, buf_size);
ZERO(t2, buf_size);
(void) s_kmul(da, db, t1, bot_size, bot_size); /* t1 = a0 * b0 */
- (void) s_kmul(a_top, b_top, t2, at_size, bt_size); /* t2 = a1 * b1 */
+ (void) s_kmul(a_top, b_top, t2, at_size, bt_size); /* t2 = a1 * b1 */
/* Subtract out t1 and t2 to get the inner product */
s_usub(t3, t1, t3, buf_size + 2, buf_size);
@@ -2692,10 +2692,10 @@ s_ksqr(mp_digit *da, mp_digit *dc, mp_size size_a)
t3 = t2 + buf_size;
ZERO(t1, 4 * buf_size);
- (void) s_ksqr(da, t1, bot_size); /* t1 = a0 ^ 2 */
- (void) s_ksqr(a_top, t2, at_size); /* t2 = a1 ^ 2 */
+ (void) s_ksqr(da, t1, bot_size); /* t1 = a0 ^ 2 */
+ (void) s_ksqr(a_top, t2, at_size); /* t2 = a1 ^ 2 */
- (void) s_kmul(da, a_top, t3, bot_size, at_size); /* t3 = a0 * a1 */
+ (void) s_kmul(da, a_top, t3, bot_size, at_size); /* t3 = a0 * a1 */
/* Quick multiply t3 by 2, shifting left (can't overflow) */
{
@@ -2782,7 +2782,7 @@ s_usqr(mp_digit *da, mp_digit *dc, mp_size size_a)
w = UPPER_HALF(w);
if (ov)
{
- w += MP_DIGIT_MAX; /* MP_RADIX */
+ w += MP_DIGIT_MAX; /* MP_RADIX */
++w;
}
}
diff --git a/contrib/pgcrypto/imath.h b/contrib/pgcrypto/imath.h
index 8ba38d3acb9..2d7a5268e5c 100644
--- a/contrib/pgcrypto/imath.h
+++ b/contrib/pgcrypto/imath.h
@@ -106,9 +106,9 @@ void mp_int_free(mp_int z);
mp_result mp_int_copy(mp_int a, mp_int c); /* c = a */
void mp_int_swap(mp_int a, mp_int c); /* swap a, c */
-void mp_int_zero(mp_int z); /* z = 0 */
-mp_result mp_int_abs(mp_int a, mp_int c); /* c = |a| */
-mp_result mp_int_neg(mp_int a, mp_int c); /* c = -a */
+void mp_int_zero(mp_int z); /* z = 0 */
+mp_result mp_int_abs(mp_int a, mp_int c); /* c = |a| */
+mp_result mp_int_neg(mp_int a, mp_int c); /* c = -a */
mp_result mp_int_add(mp_int a, mp_int b, mp_int c); /* c = a + b */
mp_result mp_int_add_value(mp_int a, int value, mp_int c);
mp_result mp_int_sub(mp_int a, mp_int b, mp_int c); /* c = a - b */
@@ -116,23 +116,23 @@ mp_result mp_int_sub_value(mp_int a, int value, mp_int c);
mp_result mp_int_mul(mp_int a, mp_int b, mp_int c); /* c = a * b */
mp_result mp_int_mul_value(mp_int a, int value, mp_int c);
mp_result mp_int_mul_pow2(mp_int a, int p2, mp_int c);
-mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */
+mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */
-mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */
+mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */
mp_int q, mp_int r); /* r = a % b */
-mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */
- mp_int q, int *r); /* r = a % value */
+mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */
+ mp_int q, int *r); /* r = a % value */
mp_result mp_int_div_pow2(mp_int a, int p2, /* q = a / 2^p2 */
mp_int q, mp_int r); /* r = q % 2^p2 */
mp_result mp_int_mod(mp_int a, mp_int m, mp_int c); /* c = a % m */
#define mp_int_mod_value(A, V, R) mp_int_div_value((A), (V), 0, (R))
-mp_result mp_int_expt(mp_int a, int b, mp_int c); /* c = a^b */
+mp_result mp_int_expt(mp_int a, int b, mp_int c); /* c = a^b */
mp_result mp_int_expt_value(int a, int b, mp_int c); /* c = a^b */
int mp_int_compare(mp_int a, mp_int b); /* a <=> b */
-int mp_int_compare_unsigned(mp_int a, mp_int b); /* |a| <=> |b| */
-int mp_int_compare_zero(mp_int z); /* a <=> 0 */
+int mp_int_compare_unsigned(mp_int a, mp_int b); /* |a| <=> |b| */
+int mp_int_compare_zero(mp_int z); /* a <=> 0 */
int mp_int_compare_value(mp_int z, int value); /* a <=> v */
/* Returns true if v|a, false otherwise (including errors) */
@@ -144,15 +144,15 @@ int mp_int_is_pow2(mp_int z);
mp_result mp_int_exptmod(mp_int a, mp_int b, mp_int m,
mp_int c); /* c = a^b (mod m) */
mp_result mp_int_exptmod_evalue(mp_int a, int value,
- mp_int m, mp_int c); /* c = a^v (mod m) */
+ mp_int m, mp_int c); /* c = a^v (mod m) */
mp_result mp_int_exptmod_bvalue(int value, mp_int b,
- mp_int m, mp_int c); /* c = v^b (mod m) */
+ mp_int m, mp_int c); /* c = v^b (mod m) */
mp_result mp_int_exptmod_known(mp_int a, mp_int b,
mp_int m, mp_int mu,
mp_int c); /* c = a^b (mod m) */
mp_result mp_int_redux_const(mp_int m, mp_int c);
-mp_result mp_int_invmod(mp_int a, mp_int m, mp_int c); /* c = 1/a (mod m) */
+mp_result mp_int_invmod(mp_int a, mp_int m, mp_int c); /* c = 1/a (mod m) */
mp_result mp_int_gcd(mp_int a, mp_int b, mp_int c); /* c = gcd(a, b) */
@@ -207,4 +207,4 @@ void s_print(char *tag, mp_int z);
void s_print_buf(char *tag, mp_digit *buf, mp_size num);
#endif
-#endif /* end IMATH_H_ */
+#endif /* end IMATH_H_ */
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c
index c2687cfdb2e..16dfe725eae 100644
--- a/contrib/pgcrypto/internal.c
+++ b/contrib/pgcrypto/internal.c
@@ -42,11 +42,11 @@
/*
* System reseeds should be separated at least this much.
*/
-#define SYSTEM_RESEED_MIN (20*60) /* 20 min */
+#define SYSTEM_RESEED_MIN (20*60) /* 20 min */
/*
* How often to roll dice.
*/
-#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */
+#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */
/*
* The chance is x/256 that the reseed happens.
*/
diff --git a/contrib/pgcrypto/mbuf.h b/contrib/pgcrypto/mbuf.h
index d413eb52764..50a989f059d 100644
--- a/contrib/pgcrypto/mbuf.h
+++ b/contrib/pgcrypto/mbuf.h
@@ -121,4 +121,4 @@ int pullf_create_mbuf_reader(PullFilter **pf_p, MBuf *mbuf);
(dst) = __b; \
} while (0)
-#endif /* __PX_MBUF_H */
+#endif /* __PX_MBUF_H */
diff --git a/contrib/pgcrypto/md5.h b/contrib/pgcrypto/md5.h
index 07d08c134d4..3e6e8da5e7f 100644
--- a/contrib/pgcrypto/md5.h
+++ b/contrib/pgcrypto/md5.h
@@ -76,4 +76,4 @@ do { \
md5_result((x), (y)); \
} while (0)
-#endif /* ! _NETINET6_MD5_H_ */
+#endif /* ! _NETINET6_MD5_H_ */
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index 804a27018a2..1b6ea4c9eaf 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ -155,8 +155,8 @@ struct PGP_Context
*/
int mdc_checked;
int corrupt_prefix; /* prefix failed RFC 4880 "quick check" */
- int unsupported_compr; /* has bzip2 compression */
- int unexpected_binary; /* binary data seen in text_mode */
+ int unsupported_compr; /* has bzip2 compression */
+ int unexpected_binary; /* binary data seen in text_mode */
int in_mdc_pkt;
int use_mdcbuf_filter;
PX_MD *mdc_ctx;
diff --git a/contrib/pgcrypto/px-crypt.h b/contrib/pgcrypto/px-crypt.h
index 24daee743c9..4ea72dcbc5e 100644
--- a/contrib/pgcrypto/px-crypt.h
+++ b/contrib/pgcrypto/px-crypt.h
@@ -79,4 +79,4 @@ char *px_crypt_des(const char *key, const char *setting);
char *px_crypt_md5(const char *pw, const char *salt,
char *dst, unsigned dstlen);
-#endif /* _PX_CRYPT_H */
+#endif /* _PX_CRYPT_H */
diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h
index e8068317d0b..cef9c4b4565 100644
--- a/contrib/pgcrypto/px.h
+++ b/contrib/pgcrypto/px.h
@@ -154,7 +154,7 @@ struct px_hmac
struct px_cipher
{
unsigned (*block_size) (PX_Cipher *c);
- unsigned (*key_size) (PX_Cipher *c); /* max key len */
+ unsigned (*key_size) (PX_Cipher *c); /* max key len */
unsigned (*iv_size) (PX_Cipher *c);
int (*init) (PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv);
@@ -239,4 +239,4 @@ void px_debug(const char *fmt,...) pg_attribute_printf(1, 2);
(c)->decrypt(c, data, dlen, res, rlen)
#define px_combo_free(c) (c)->free(c)
-#endif /* __PX_H */
+#endif /* __PX_H */
diff --git a/contrib/pgcrypto/rijndael.c b/contrib/pgcrypto/rijndael.c
index 4adbcc1f916..4c074efbc04 100644
--- a/contrib/pgcrypto/rijndael.c
+++ b/contrib/pgcrypto/rijndael.c
@@ -97,7 +97,7 @@ static u4byte il_tab[4][256];
#endif
static u4byte tab_gen = 0;
-#endif /* !PRE_CALC_TABLES */
+#endif /* !PRE_CALC_TABLES */
#define ff_mult(a,b) ((a) && (b) ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0)
@@ -250,7 +250,7 @@ gen_tabs(void)
}
tab_gen = 1;
-#endif /* !PRE_CALC_TABLES */
+#endif /* !PRE_CALC_TABLES */
}
diff --git a/contrib/pgcrypto/rijndael.h b/contrib/pgcrypto/rijndael.h
index 108ef68b760..bc9ddfaad35 100644
--- a/contrib/pgcrypto/rijndael.h
+++ b/contrib/pgcrypto/rijndael.h
@@ -56,4 +56,4 @@ void aes_ecb_decrypt(rijndael_ctx *ctx, uint8 *data, unsigned len);
void aes_cbc_encrypt(rijndael_ctx *ctx, uint8 *iva, uint8 *data, unsigned len);
void aes_cbc_decrypt(rijndael_ctx *ctx, uint8 *iva, uint8 *data, unsigned len);
-#endif /* _RIJNDAEL_H_ */
+#endif /* _RIJNDAEL_H_ */
diff --git a/contrib/pgcrypto/sha1.h b/contrib/pgcrypto/sha1.h
index 2f61e454ba4..4300694a348 100644
--- a/contrib/pgcrypto/sha1.h
+++ b/contrib/pgcrypto/sha1.h
@@ -72,4 +72,4 @@ typedef struct sha1_ctxt SHA1_CTX;
#define SHA1_RESULTLEN (160/8)
-#endif /* _NETINET6_SHA1_H_ */
+#endif /* _NETINET6_SHA1_H_ */
diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c
index 03b387f6b6b..c3a95208c12 100644
--- a/contrib/pgstattuple/pgstatindex.c
+++ b/contrib/pgstattuple/pgstatindex.c
@@ -333,7 +333,7 @@ pgstatindex_impl(Relation rel, FunctionCallInfo fcinfo)
values[j++] = psprintf("%d", indexStat.version);
values[j++] = psprintf("%d", indexStat.level);
values[j++] = psprintf(INT64_FORMAT,
- (1 + /* include the metapage in index_size */
+ (1 + /* include the metapage in index_size */
indexStat.leaf_pages +
indexStat.internal_pages +
indexStat.deleted_pages +
diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c
index e24db569ea8..ca496b9df77 100644
--- a/contrib/postgres_fdw/option.c
+++ b/contrib/postgres_fdw/option.c
@@ -258,7 +258,7 @@ is_valid_option(const char *keyword, Oid context)
{
PgFdwOption *opt;
- Assert(postgres_fdw_options); /* must be initialized already */
+ Assert(postgres_fdw_options); /* must be initialized already */
for (opt = postgres_fdw_options; opt->keyword; opt++)
{
@@ -277,7 +277,7 @@ is_libpq_option(const char *keyword)
{
PgFdwOption *opt;
- Assert(postgres_fdw_options); /* must be initialized already */
+ Assert(postgres_fdw_options); /* must be initialized already */
for (opt = postgres_fdw_options; opt->keyword; opt++)
{
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 080cb0a0742..3d180984617 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -899,14 +899,14 @@ postgresGetForeignPaths(PlannerInfo *root,
* to estimate cost and size of this path.
*/
path = create_foreignscan_path(root, baserel,
- NULL, /* default pathtarget */
+ NULL, /* default pathtarget */
fpinfo->rows,
fpinfo->startup_cost,
fpinfo->total_cost,
NIL, /* no pathkeys */
- NULL, /* no outer rel either */
- NULL, /* no extra plan */
- NIL); /* no fdw_private list */
+ NULL, /* no outer rel either */
+ NULL, /* no extra plan */
+ NIL); /* no fdw_private list */
add_path(baserel, (Path *) path);
/* Add paths with pathkeys */
@@ -1075,7 +1075,7 @@ postgresGetForeignPaths(PlannerInfo *root,
rows,
startup_cost,
total_cost,
- NIL, /* no pathkeys */
+ NIL, /* no pathkeys */
param_info->ppi_req_outer,
NULL,
NIL); /* no fdw_private list */
@@ -1591,7 +1591,7 @@ postgresPlanForeignModify(PlannerInfo *root,
/* bit numbers are offset by FirstLowInvalidHeapAttributeNumber */
AttrNumber attno = col + FirstLowInvalidHeapAttributeNumber;
- if (attno <= InvalidAttrNumber) /* shouldn't happen */
+ if (attno <= InvalidAttrNumber) /* shouldn't happen */
elog(ERROR, "system-column update is not supported");
targetAttrs = lappend_int(targetAttrs, attno);
}
@@ -2173,7 +2173,7 @@ postgresPlanDirectModify(PlannerInfo *root,
AttrNumber attno = col + FirstLowInvalidHeapAttributeNumber;
TargetEntry *tle;
- if (attno <= InvalidAttrNumber) /* shouldn't happen */
+ if (attno <= InvalidAttrNumber) /* shouldn't happen */
elog(ERROR, "system-column update is not supported");
tle = get_tle_by_resno(subplan->targetlist, attno);
@@ -4305,7 +4305,7 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype,
* Note that since this joinrel is at the end of the join_rel_list list
* when we are called, we can get the position by list_length.
*/
- Assert(fpinfo->relation_index == 0); /* shouldn't be set yet */
+ Assert(fpinfo->relation_index == 0); /* shouldn't be set yet */
fpinfo->relation_index =
list_length(root->parse->rtable) + list_length(root->join_rel_list);
@@ -4316,7 +4316,7 @@ static void
add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel,
Path *epq_path)
{
- List *useful_pathkeys_list = NIL; /* List of all pathkeys */
+ List *useful_pathkeys_list = NIL; /* List of all pathkeys */
ListCell *lc;
useful_pathkeys_list = get_useful_pathkeys_for_relation(root, rel);
@@ -4568,7 +4568,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
rows,
startup_cost,
total_cost,
- NIL, /* no pathkeys */
+ NIL, /* no pathkeys */
NULL, /* no required_outer */
epq_path,
NIL); /* no fdw_private */
diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h
index 25c950dd768..f396dae7fbc 100644
--- a/contrib/postgres_fdw/postgres_fdw.h
+++ b/contrib/postgres_fdw/postgres_fdw.h
@@ -182,4 +182,4 @@ extern bool is_builtin(Oid objectId);
extern bool is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo);
extern const char *get_jointype_name(JoinType jointype);
-#endif /* POSTGRES_FDW_H */
+#endif /* POSTGRES_FDW_H */
diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 2f01c393ccb..f55b9de1da7 100644
--- a/contrib/sepgsql/label.c
+++ b/contrib/sepgsql/label.c
@@ -68,10 +68,10 @@ static fmgr_hook_type next_fmgr_hook = NULL;
* labels were set during the (sub-)transactions.
*/
static char *client_label_peer = NULL; /* set by getpeercon(3) */
-static List *client_label_pending = NIL; /* pending list being set by
- * sepgsql_setcon() */
-static char *client_label_committed = NULL; /* set by sepgsql_setcon(),
- * and already committed */
+static List *client_label_pending = NIL; /* pending list being set by
+ * sepgsql_setcon() */
+static char *client_label_committed = NULL; /* set by sepgsql_setcon(), and
+ * already committed */
static char *client_label_func = NULL; /* set by trusted procedure */
typedef struct
diff --git a/contrib/sepgsql/sepgsql.h b/contrib/sepgsql/sepgsql.h
index fbe25e6602d..d4bf0cd14af 100644
--- a/contrib/sepgsql/sepgsql.h
+++ b/contrib/sepgsql/sepgsql.h
@@ -324,4 +324,4 @@ extern void sepgsql_proc_relabel(Oid functionId, const char *seclabel);
extern void sepgsql_proc_setattr(Oid functionId);
extern void sepgsql_proc_execute(Oid functionId);
-#endif /* SEPGSQL_H */
+#endif /* SEPGSQL_H */
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 208ff6103de..692d99ca5b3 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -248,7 +248,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
Datum *kvals; /* key values */
char *relname; /* referencing relation name */
Relation rel; /* triggered relation */
- HeapTuple trigtuple = NULL; /* tuple to being changed */
+ HeapTuple trigtuple = NULL; /* tuple to being changed */
HeapTuple newtuple = NULL; /* tuple to return */
TupleDesc tupdesc; /* tuple description */
EPlan *plan; /* prepared plan(s) */
diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c
index c4b3e7d6fae..f7905e20dba 100644
--- a/contrib/spi/timetravel.c
+++ b/contrib/spi/timetravel.c
@@ -85,7 +85,7 @@ timetravel(PG_FUNCTION_ARGS)
Trigger *trigger; /* to get trigger name */
int argc;
char **args; /* arguments */
- int attnum[MaxAttrNum]; /* fnumbers of start/stop columns */
+ int attnum[MaxAttrNum]; /* fnumbers of start/stop columns */
Datum oldtimeon,
oldtimeoff;
Datum newtimeon,
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c
index 7434ca93731..b5e1ad29e2e 100644
--- a/contrib/tablefunc/tablefunc.c
+++ b/contrib/tablefunc/tablefunc.c
@@ -1187,8 +1187,8 @@ connectby(char *relname,
branch_delim,
start_with,
start_with, /* current_branch */
- 0, /* initial level is 0 */
- &serial, /* initial serial is 1 */
+ 0, /* initial level is 0 */
+ &serial, /* initial serial is 1 */
max_depth,
show_branch,
show_serial,
diff --git a/contrib/tablefunc/tablefunc.h b/contrib/tablefunc/tablefunc.h
index 87fa1e5dcb1..e88a5720fa0 100644
--- a/contrib/tablefunc/tablefunc.h
+++ b/contrib/tablefunc/tablefunc.h
@@ -36,4 +36,4 @@
#include "fmgr.h"
-#endif /* TABLEFUNC_H */
+#endif /* TABLEFUNC_H */
diff --git a/contrib/tcn/tcn.c b/contrib/tcn/tcn.c
index 124110830fa..5106d424b40 100644
--- a/contrib/tcn/tcn.c
+++ b/contrib/tcn/tcn.c
@@ -132,7 +132,7 @@ triggered_change_notification(PG_FUNCTION_ARGS)
Form_pg_index index;
indexTuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexoid));
- if (!HeapTupleIsValid(indexTuple)) /* should not happen */
+ if (!HeapTupleIsValid(indexTuple)) /* should not happen */
elog(ERROR, "cache lookup failed for index %u", indexoid);
index = (Form_pg_index) GETSTRUCT(indexTuple);
/* we're only interested if it is the primary key and valid */
@@ -175,5 +175,5 @@ triggered_change_notification(PG_FUNCTION_ARGS)
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
errmsg("triggered_change_notification: must be called on a table with a primary key")));
- return PointerGetDatum(NULL); /* after trigger; value doesn't matter */
+ return PointerGetDatum(NULL); /* after trigger; value doesn't matter */
}
diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c
index f34398f54a7..55bc6094158 100644
--- a/contrib/uuid-ossp/uuid-ossp.c
+++ b/contrib/uuid-ossp/uuid-ossp.c
@@ -110,7 +110,7 @@ do { \
uu.clock_seq_hi_and_reserved |= 0x80; \
} while(0)
-#endif /* !HAVE_UUID_OSSP */
+#endif /* !HAVE_UUID_OSSP */
PG_MODULE_MAGIC;
@@ -398,7 +398,7 @@ uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len)
return DirectFunctionCall1(uuid_in, CStringGetDatum(strbuf));
}
-#endif /* HAVE_UUID_OSSP */
+#endif /* HAVE_UUID_OSSP */
Datum
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index acf1c4a1c11..a48818d944a 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -95,7 +95,7 @@ PG_FUNCTION_INFO_V1(xml_is_well_formed);
Datum
xml_is_well_formed(PG_FUNCTION_ARGS)
{
- text *t = PG_GETARG_TEXT_PP(0); /* document buffer */
+ text *t = PG_GETARG_TEXT_PP(0); /* document buffer */
bool result = false;
int32 docsize = VARSIZE_ANY_EXHDR(t);
xmlDocPtr doctree;
@@ -249,7 +249,7 @@ Datum
xpath_nodeset(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
- text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
+ text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *toptag = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(2));
xmlChar *septag = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(3));
xmlChar *xpath;
@@ -282,7 +282,7 @@ Datum
xpath_list(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
- text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
+ text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *plainsep = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(2));
xmlChar *xpath;
text *xpres;
@@ -311,7 +311,7 @@ Datum
xpath_string(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
- text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
+ text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *xpath;
int32 pathsize;
text *xpres;
@@ -352,7 +352,7 @@ Datum
xpath_number(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
- text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
+ text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *xpath;
float4 fRes;
xmlXPathObjectPtr res;
@@ -384,7 +384,7 @@ Datum
xpath_bool(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
- text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
+ text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *xpath;
int bRes;
xmlXPathObjectPtr res;
diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c
index 391e6b593b0..fb49b98f5a1 100644
--- a/contrib/xml2/xslt_proc.c
+++ b/contrib/xml2/xslt_proc.c
@@ -29,7 +29,7 @@
#include <libxslt/security.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
-#endif /* USE_LIBXSLT */
+#endif /* USE_LIBXSLT */
#ifdef USE_LIBXSLT
@@ -39,7 +39,7 @@ extern PgXmlErrorContext *pgxml_parser_init(PgXmlStrictness strictness);
/* local defs */
static const char **parse_params(text *paramstr);
-#endif /* USE_LIBXSLT */
+#endif /* USE_LIBXSLT */
PG_FUNCTION_INFO_V1(xslt_process);
@@ -189,7 +189,7 @@ xslt_process(PG_FUNCTION_ARGS)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("xslt_process() is not available without libxslt")));
PG_RETURN_NULL();
-#endif /* USE_LIBXSLT */
+#endif /* USE_LIBXSLT */
}
#ifdef USE_LIBXSLT
@@ -253,4 +253,4 @@ parse_params(text *paramstr)
return params;
}
-#endif /* USE_LIBXSLT */
+#endif /* USE_LIBXSLT */