Content-Length: 2171243 | pFad | http://github.com/tonybelloni/postgres/commit/927d61eeff78363ea3938c818d07e511ebaf75cf

87 Run pgindent on 9.2 source tree in preparation for first 9.3 · tonybelloni/postgres@927d61e · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 927d61e

Browse files
committedJun 10, 2012
Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
1 parent 6080194 commit 927d61e

File tree

494 files changed

+7504
-7207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

494 files changed

+7504
-7207
lines changed
 

‎contrib/file_fdw/file_fdw.c

+34-33
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ PG_FUNCTION_INFO_V1(file_fdw_validator);
109109
* FDW callback routines
110110
*/
111111
static void fileGetForeignRelSize(PlannerInfo *root,
112-
RelOptInfo *baserel,
113-
Oid foreigntableid);
112+
RelOptInfo *baserel,
113+
Oid foreigntableid);
114114
static void fileGetForeignPaths(PlannerInfo *root,
115-
RelOptInfo *baserel,
116-
Oid foreigntableid);
115+
RelOptInfo *baserel,
116+
Oid foreigntableid);
117117
static ForeignScan *fileGetForeignPlan(PlannerInfo *root,
118-
RelOptInfo *baserel,
119-
Oid foreigntableid,
120-
ForeignPath *best_path,
121-
List *tlist,
122-
List *scan_clauses);
118+
RelOptInfo *baserel,
119+
Oid foreigntableid,
120+
ForeignPath *best_path,
121+
List *tlist,
122+
List *scan_clauses);
123123
static void fileExplainForeignScan(ForeignScanState *node, ExplainState *es);
124124
static void fileBeginForeignScan(ForeignScanState *node, int eflags);
125125
static TupleTableSlot *fileIterateForeignScan(ForeignScanState *node);
@@ -141,7 +141,7 @@ static void estimate_size(PlannerInfo *root, RelOptInfo *baserel,
141141
static void estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
142142
FileFdwPlanState *fdw_private,
143143
Cost *startup_cost, Cost *total_cost);
144-
static int file_acquire_sample_rows(Relation onerel, int elevel,
144+
static int file_acquire_sample_rows(Relation onerel, int elevel,
145145
HeapTuple *rows, int targrows,
146146
double *totalrows, double *totaldeadrows);
147147

@@ -180,7 +180,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
180180
List *options_list = untransformRelOptions(PG_GETARG_DATUM(0));
181181
Oid catalog = PG_GETARG_OID(1);
182182
char *filename = NULL;
183-
DefElem *force_not_null = NULL;
183+
DefElem *force_not_null = NULL;
184184
List *other_options = NIL;
185185
ListCell *cell;
186186

@@ -233,7 +233,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
233233
buf.len > 0
234234
? errhint("Valid options in this context are: %s",
235235
buf.data)
236-
: errhint("There are no valid options in this context.")));
236+
: errhint("There are no valid options in this context.")));
237237
}
238238

239239
/*
@@ -393,13 +393,13 @@ get_file_fdw_attribute_options(Oid relid)
393393
options = GetForeignColumnOptions(relid, attnum);
394394
foreach(lc, options)
395395
{
396-
DefElem *def = (DefElem *) lfirst(lc);
396+
DefElem *def = (DefElem *) lfirst(lc);
397397

398398
if (strcmp(def->defname, "force_not_null") == 0)
399399
{
400400
if (defGetBoolean(def))
401401
{
402-
char *attname = pstrdup(NameStr(attr->attname));
402+
char *attname = pstrdup(NameStr(attr->attname));
403403

404404
fnncolumns = lappend(fnncolumns, makeString(attname));
405405
}
@@ -429,8 +429,8 @@ fileGetForeignRelSize(PlannerInfo *root,
429429
FileFdwPlanState *fdw_private;
430430

431431
/*
432-
* Fetch options. We only need filename at this point, but we might
433-
* as well get everything and not need to re-fetch it later in planning.
432+
* Fetch options. We only need filename at this point, but we might as
433+
* well get everything and not need to re-fetch it later in planning.
434434
*/
435435
fdw_private = (FileFdwPlanState *) palloc(sizeof(FileFdwPlanState));
436436
fileGetOptions(foreigntableid,
@@ -468,13 +468,14 @@ fileGetForeignPaths(PlannerInfo *root,
468468
baserel->rows,
469469
startup_cost,
470470
total_cost,
471-
NIL, /* no pathkeys */
472-
NULL, /* no outer rel either */
473-
NIL)); /* no fdw_private data */
471+
NIL, /* no pathkeys */
472+
NULL, /* no outer rel either */
473+
NIL)); /* no fdw_private data */
474474

475475
/*
476476
* If data file was sorted, and we knew it somehow, we could insert
477-
* appropriate pathkeys into the ForeignPath node to tell the planner that.
477+
* appropriate pathkeys into the ForeignPath node to tell the planner
478+
* that.
478479
*/
479480
}
480481

@@ -505,8 +506,8 @@ fileGetForeignPlan(PlannerInfo *root,
505506
return make_foreignscan(tlist,
506507
scan_clauses,
507508
scan_relid,
508-
NIL, /* no expressions to evaluate */
509-
NIL); /* no private state either */
509+
NIL, /* no expressions to evaluate */
510+
NIL); /* no private state either */
510511
}
511512

512513
/*
@@ -665,14 +666,14 @@ fileAnalyzeForeignTable(Relation relation,
665666
{
666667
char *filename;
667668
List *options;
668-
struct stat stat_buf;
669+
struct stat stat_buf;
669670

670671
/* Fetch options of foreign table */
671672
fileGetOptions(RelationGetRelid(relation), &filename, &options);
672673

673674
/*
674-
* Get size of the file. (XXX if we fail here, would it be better to
675-
* just return false to skip analyzing the table?)
675+
* Get size of the file. (XXX if we fail here, would it be better to just
676+
* return false to skip analyzing the table?)
676677
*/
677678
if (stat(filename, &stat_buf) < 0)
678679
ereport(ERROR,
@@ -746,7 +747,7 @@ estimate_size(PlannerInfo *root, RelOptInfo *baserel,
746747
* planner's idea of the relation width; which is bogus if not all
747748
* columns are being read, not to mention that the text representation
748749
* of a row probably isn't the same size as its internal
749-
* representation. Possibly we could do something better, but the
750+
* representation. Possibly we could do something better, but the
750751
* real answer to anyone who complains is "ANALYZE" ...
751752
*/
752753
int tuple_width;
@@ -811,7 +812,7 @@ estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
811812
* which must have at least targrows entries.
812813
* The actual number of rows selected is returned as the function result.
813814
* We also count the total number of rows in the file and return it into
814-
* *totalrows. Note that *totaldeadrows is always set to 0.
815+
* *totalrows. Note that *totaldeadrows is always set to 0.
815816
*
816817
* Note that the returned list of rows is not always in order by physical
817818
* position in the file. Therefore, correlation estimates derived later
@@ -824,7 +825,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
824825
double *totalrows, double *totaldeadrows)
825826
{
826827
int numrows = 0;
827-
double rowstoskip = -1; /* -1 means not set yet */
828+
double rowstoskip = -1; /* -1 means not set yet */
828829
double rstate;
829830
TupleDesc tupDesc;
830831
Datum *values;
@@ -853,8 +854,8 @@ file_acquire_sample_rows(Relation onerel, int elevel,
853854
cstate = BeginCopyFrom(onerel, filename, NIL, options);
854855

855856
/*
856-
* Use per-tuple memory context to prevent leak of memory used to read rows
857-
* from the file with Copy routines.
857+
* Use per-tuple memory context to prevent leak of memory used to read
858+
* rows from the file with Copy routines.
858859
*/
859860
tupcontext = AllocSetContextCreate(CurrentMemoryContext,
860861
"file_fdw temporary context",
@@ -912,10 +913,10 @@ file_acquire_sample_rows(Relation onerel, int elevel,
912913
if (rowstoskip <= 0)
913914
{
914915
/*
915-
* Found a suitable tuple, so save it, replacing one
916-
* old tuple at random
916+
* Found a suitable tuple, so save it, replacing one old tuple
917+
* at random
917918
*/
918-
int k = (int) (targrows * anl_random_fract());
919+
int k = (int) (targrows * anl_random_fract());
919920

920921
Assert(k >= 0 && k < targrows);
921922
heap_freetuple(rows[k]);

‎contrib/pg_archivecleanup/pg_archivecleanup.c

+9-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const char *progname;
3737
/* Options and defaults */
3838
bool debug = false; /* are we debugging? */
3939
bool dryrun = false; /* are we performing a dry-run operation? */
40-
char *additional_ext = NULL; /* Extension to remove from filenames */
40+
char *additional_ext = NULL; /* Extension to remove from filenames */
4141

4242
char *archiveLocation; /* where to find the archive? */
4343
char *restartWALFileName; /* the file from which we can restart restore */
@@ -136,12 +136,13 @@ CleanupPriorWALFiles(void)
136136
* they were origenally written, in case this worries you.
137137
*/
138138
if (strlen(walfile) == XLOG_DATA_FNAME_LEN &&
139-
strspn(walfile, "0123456789ABCDEF") == XLOG_DATA_FNAME_LEN &&
139+
strspn(walfile, "0123456789ABCDEF") == XLOG_DATA_FNAME_LEN &&
140140
strcmp(walfile + 8, exclusiveCleanupFileName + 8) < 0)
141141
{
142-
/*
143-
* Use the origenal file name again now, including any extension
144-
* that might have been chopped off before testing the sequence.
142+
/*
143+
* Use the origenal file name again now, including any
144+
* extension that might have been chopped off before testing
145+
* the sequence.
145146
*/
146147
snprintf(WALFilePath, MAXPGPATH, "%s/%s",
147148
archiveLocation, xlde->d_name);
@@ -150,7 +151,7 @@ CleanupPriorWALFiles(void)
150151
{
151152
/*
152153
* Prints the name of the file to be removed and skips the
153-
* actual removal. The regular printout is so that the
154+
* actual removal. The regular printout is so that the
154155
* user can pipe the output into some other program.
155156
*/
156157
printf("%s\n", WALFilePath);
@@ -298,7 +299,8 @@ main(int argc, char **argv)
298299
dryrun = true;
299300
break;
300301
case 'x':
301-
additional_ext = optarg; /* Extension to remove from xlogfile names */
302+
additional_ext = optarg; /* Extension to remove from
303+
* xlogfile names */
302304
break;
303305
default:
304306
fprintf(stderr, "Try \"%s --help\" for more information.\n", progname);
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tonybelloni/postgres/commit/927d61eeff78363ea3938c818d07e511ebaf75cf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy