Permalink
Browse files

Run pgindent on 9.2 source tree in preparation for first 9.3

commit-fest.
  • Loading branch information...
1 parent 6080194 commit 927d61eeff78363ea3938c818d07e511ebaf75cf @bmomjian bmomjian committed Jun 10, 2012
Showing 494 changed files with 7,504 additions and 7,207 deletions.
@@ -23,7 +23,7 @@ static int auto_explain_log_min_duration = -1; /* msec or -1 */
static bool auto_explain_log_analyze = false;
static bool auto_explain_log_verbose = false;
static bool auto_explain_log_buffers = false;
-static bool auto_explain_log_timing = false;
+static bool auto_explain_log_timing = false;
static int auto_explain_log_format = EXPLAIN_FORMAT_TEXT;
static bool auto_explain_log_nested_statements = false;
View
@@ -1140,7 +1140,7 @@ storeHandler(PGresult *res, const PGdataValue *columns,
* strings and add null termination. As a micro-optimization, allocate
* all the strings with one palloc.
*/
- pbuflen = nfields; /* count the null terminators themselves */
+ pbuflen = nfields; /* count the null terminators themselves */
for (i = 0; i < nfields; i++)
{
int len = columns[i].len;
@@ -109,17 +109,17 @@ PG_FUNCTION_INFO_V1(file_fdw_validator);
* FDW callback routines
*/
static void fileGetForeignRelSize(PlannerInfo *root,
- RelOptInfo *baserel,
- Oid foreigntableid);
+ RelOptInfo *baserel,
+ Oid foreigntableid);
static void fileGetForeignPaths(PlannerInfo *root,
- RelOptInfo *baserel,
- Oid foreigntableid);
+ RelOptInfo *baserel,
+ Oid foreigntableid);
static ForeignScan *fileGetForeignPlan(PlannerInfo *root,
- RelOptInfo *baserel,
- Oid foreigntableid,
- ForeignPath *best_path,
- List *tlist,
- List *scan_clauses);
+ RelOptInfo *baserel,
+ Oid foreigntableid,
+ ForeignPath *best_path,
+ List *tlist,
+ List *scan_clauses);
static void fileExplainForeignScan(ForeignScanState *node, ExplainState *es);
static void fileBeginForeignScan(ForeignScanState *node, int eflags);
static TupleTableSlot *fileIterateForeignScan(ForeignScanState *node);
@@ -141,7 +141,7 @@ static void estimate_size(PlannerInfo *root, RelOptInfo *baserel,
static void estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
FileFdwPlanState *fdw_private,
Cost *startup_cost, Cost *total_cost);
-static int file_acquire_sample_rows(Relation onerel, int elevel,
+static int file_acquire_sample_rows(Relation onerel, int elevel,
HeapTuple *rows, int targrows,
double *totalrows, double *totaldeadrows);
@@ -180,7 +180,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
List *options_list = untransformRelOptions(PG_GETARG_DATUM(0));
Oid catalog = PG_GETARG_OID(1);
char *filename = NULL;
- DefElem *force_not_null = NULL;
+ DefElem *force_not_null = NULL;
List *other_options = NIL;
ListCell *cell;
@@ -233,7 +233,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
buf.len > 0
? errhint("Valid options in this context are: %s",
buf.data)
- : errhint("There are no valid options in this context.")));
+ : errhint("There are no valid options in this context.")));
}
/*
@@ -393,13 +393,13 @@ get_file_fdw_attribute_options(Oid relid)
options = GetForeignColumnOptions(relid, attnum);
foreach(lc, options)
{
- DefElem *def = (DefElem *) lfirst(lc);
+ DefElem *def = (DefElem *) lfirst(lc);
if (strcmp(def->defname, "force_not_null") == 0)
{
if (defGetBoolean(def))
{
- char *attname = pstrdup(NameStr(attr->attname));
+ char *attname = pstrdup(NameStr(attr->attname));
fnncolumns = lappend(fnncolumns, makeString(attname));
}
@@ -429,8 +429,8 @@ fileGetForeignRelSize(PlannerInfo *root,
FileFdwPlanState *fdw_private;
/*
- * Fetch options. We only need filename at this point, but we might
- * as well get everything and not need to re-fetch it later in planning.
+ * Fetch options. We only need filename at this point, but we might as
+ * well get everything and not need to re-fetch it later in planning.
*/
fdw_private = (FileFdwPlanState *) palloc(sizeof(FileFdwPlanState));
fileGetOptions(foreigntableid,
@@ -468,13 +468,14 @@ fileGetForeignPaths(PlannerInfo *root,
baserel->rows,
startup_cost,
total_cost,
- NIL, /* no pathkeys */
- NULL, /* no outer rel either */
- NIL)); /* no fdw_private data */
+ NIL, /* no pathkeys */
+ NULL, /* no outer rel either */
+ NIL)); /* no fdw_private data */
/*
* If data file was sorted, and we knew it somehow, we could insert
- * appropriate pathkeys into the ForeignPath node to tell the planner that.
+ * appropriate pathkeys into the ForeignPath node to tell the planner
+ * that.
*/
}
@@ -505,8 +506,8 @@ fileGetForeignPlan(PlannerInfo *root,
return make_foreignscan(tlist,
scan_clauses,
scan_relid,
- NIL, /* no expressions to evaluate */
- NIL); /* no private state either */
+ NIL, /* no expressions to evaluate */
+ NIL); /* no private state either */
}
/*
@@ -665,14 +666,14 @@ fileAnalyzeForeignTable(Relation relation,
{
char *filename;
List *options;
- struct stat stat_buf;
+ struct stat stat_buf;
/* Fetch options of foreign table */
fileGetOptions(RelationGetRelid(relation), &filename, &options);
/*
- * Get size of the file. (XXX if we fail here, would it be better to
- * just return false to skip analyzing the table?)
+ * Get size of the file. (XXX if we fail here, would it be better to just
+ * return false to skip analyzing the table?)
*/
if (stat(filename, &stat_buf) < 0)
ereport(ERROR,
@@ -746,7 +747,7 @@ estimate_size(PlannerInfo *root, RelOptInfo *baserel,
* planner's idea of the relation width; which is bogus if not all
* columns are being read, not to mention that the text representation
* of a row probably isn't the same size as its internal
- * representation. Possibly we could do something better, but the
+ * representation. Possibly we could do something better, but the
* real answer to anyone who complains is "ANALYZE" ...
*/
int tuple_width;
@@ -811,7 +812,7 @@ estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
* which must have at least targrows entries.
* The actual number of rows selected is returned as the function result.
* We also count the total number of rows in the file and return it into
- * *totalrows. Note that *totaldeadrows is always set to 0.
+ * *totalrows. Note that *totaldeadrows is always set to 0.
*
* Note that the returned list of rows is not always in order by physical
* position in the file. Therefore, correlation estimates derived later
@@ -824,7 +825,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
double *totalrows, double *totaldeadrows)
{
int numrows = 0;
- double rowstoskip = -1; /* -1 means not set yet */
+ double rowstoskip = -1; /* -1 means not set yet */
double rstate;
TupleDesc tupDesc;
Datum *values;
@@ -853,8 +854,8 @@ file_acquire_sample_rows(Relation onerel, int elevel,
cstate = BeginCopyFrom(onerel, filename, NIL, options);
/*
- * Use per-tuple memory context to prevent leak of memory used to read rows
- * from the file with Copy routines.
+ * Use per-tuple memory context to prevent leak of memory used to read
+ * rows from the file with Copy routines.
*/
tupcontext = AllocSetContextCreate(CurrentMemoryContext,
"file_fdw temporary context",
@@ -912,10 +913,10 @@ file_acquire_sample_rows(Relation onerel, int elevel,
if (rowstoskip <= 0)
{
/*
- * Found a suitable tuple, so save it, replacing one
- * old tuple at random
+ * Found a suitable tuple, so save it, replacing one old tuple
+ * at random
*/
- int k = (int) (targrows * anl_random_fract());
+ int k = (int) (targrows * anl_random_fract());
Assert(k >= 0 && k < targrows);
heap_freetuple(rows[k]);
@@ -37,7 +37,7 @@ const char *progname;
/* Options and defaults */
bool debug = false; /* are we debugging? */
bool dryrun = false; /* are we performing a dry-run operation? */
-char *additional_ext = NULL; /* Extension to remove from filenames */
+char *additional_ext = NULL; /* Extension to remove from filenames */
char *archiveLocation; /* where to find the archive? */
char *restartWALFileName; /* the file from which we can restart restore */
@@ -136,12 +136,13 @@ CleanupPriorWALFiles(void)
* they were originally written, in case this worries you.
*/
if (strlen(walfile) == XLOG_DATA_FNAME_LEN &&
- strspn(walfile, "0123456789ABCDEF") == XLOG_DATA_FNAME_LEN &&
+ strspn(walfile, "0123456789ABCDEF") == XLOG_DATA_FNAME_LEN &&
strcmp(walfile + 8, exclusiveCleanupFileName + 8) < 0)
{
- /*
- * Use the original file name again now, including any extension
- * that might have been chopped off before testing the sequence.
+ /*
+ * Use the original file name again now, including any
+ * extension that might have been chopped off before testing
+ * the sequence.
*/
snprintf(WALFilePath, MAXPGPATH, "%s/%s",
archiveLocation, xlde->d_name);
@@ -150,7 +151,7 @@ CleanupPriorWALFiles(void)
{
/*
* Prints the name of the file to be removed and skips the
- * actual removal. The regular printout is so that the
+ * actual removal. The regular printout is so that the
* user can pipe the output into some other program.
*/
printf("%s\n", WALFilePath);
@@ -298,7 +299,8 @@ main(int argc, char **argv)
dryrun = true;
break;
case 'x':
- additional_ext = optarg; /* Extension to remove from xlogfile names */
+ additional_ext = optarg; /* Extension to remove from
+ * xlogfile names */
break;
default:
fprintf(stderr, "Try \"%s --help\" for more information.\n", progname);
Oops, something went wrong.

0 comments on commit 927d61e

Please sign in to comment.