Skip to content

Commit 6560407

Browse files
committed
Pgindent run before 9.1 beta2.
1 parent adf43b2 commit 6560407

Some content is hidden

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

92 files changed

+644
-620
lines changed

contrib/btree_gist/btree_utils_var.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ typedef struct
3333

3434
/* Methods */
3535

36-
bool (*f_gt) (const void *, const void *, Oid); /* greater than */
37-
bool (*f_ge) (const void *, const void *, Oid); /* greater equal */
38-
bool (*f_eq) (const void *, const void *, Oid); /* equal */
39-
bool (*f_le) (const void *, const void *, Oid); /* less equal */
40-
bool (*f_lt) (const void *, const void *, Oid); /* less than */
41-
int32 (*f_cmp) (const void *, const void *, Oid); /* compare */
36+
bool (*f_gt) (const void *, const void *, Oid); /* greater than */
37+
bool (*f_ge) (const void *, const void *, Oid); /* greater equal */
38+
bool (*f_eq) (const void *, const void *, Oid); /* equal */
39+
bool (*f_le) (const void *, const void *, Oid); /* less equal */
40+
bool (*f_lt) (const void *, const void *, Oid); /* less than */
41+
int32 (*f_cmp) (const void *, const void *, Oid); /* compare */
4242
GBT_VARKEY *(*f_l2n) (GBT_VARKEY *); /* convert leaf to node */
4343
} gbtree_vinfo;
4444

contrib/pg_standby/pg_standby.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ usage(void)
533533
"Main intended use as restore_command in recovery.conf:\n"
534534
" restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
535535
"e.g.\n"
536-
" restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
536+
" restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
537537
printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n");
538538
}
539539

contrib/pg_upgrade/check.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ check_new_cluster_is_empty(void)
362362
/* pg_largeobject and its index should be skipped */
363363
if (strcmp(rel_arr->rels[relnum].nspname, "pg_catalog") != 0)
364364
pg_log(PG_FATAL, "New cluster database \"%s\" is not empty\n",
365-
new_cluster.dbarr.dbs[dbnum].db_name);
365+
new_cluster.dbarr.dbs[dbnum].db_name);
366366
}
367367
}
368368

@@ -381,17 +381,18 @@ check_new_cluster_is_empty(void)
381381
static void
382382
check_old_cluster_has_new_cluster_dbs(void)
383383
{
384-
int old_dbnum, new_dbnum;
384+
int old_dbnum,
385+
new_dbnum;
385386

386387
for (new_dbnum = 0; new_dbnum < new_cluster.dbarr.ndbs; new_dbnum++)
387388
{
388389
for (old_dbnum = 0; old_dbnum < old_cluster.dbarr.ndbs; old_dbnum++)
389390
if (strcmp(old_cluster.dbarr.dbs[old_dbnum].db_name,
390-
new_cluster.dbarr.dbs[new_dbnum].db_name) == 0)
391+
new_cluster.dbarr.dbs[new_dbnum].db_name) == 0)
391392
break;
392393
if (old_dbnum == old_cluster.dbarr.ndbs)
393394
pg_log(PG_FATAL, "New cluster database \"%s\" does not exist in the old cluster\n",
394-
new_cluster.dbarr.dbs[new_dbnum].db_name);
395+
new_cluster.dbarr.dbs[new_dbnum].db_name);
395396
}
396397
}
397398

@@ -495,7 +496,7 @@ check_is_super_user(ClusterInfo *cluster)
495496

496497
if (PQntuples(res) != 1 || strcmp(PQgetvalue(res, 0, 0), "t") != 0)
497498
pg_log(PG_FATAL, "database user \"%s\" is not a superuser\n",
498-
os_info.user);
499+
os_info.user);
499500

500501
PQclear(res);
501502

contrib/pg_upgrade/controldata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ get_control_data(ClusterInfo *cluster, bool live_check)
9090
pg_putenv("LC_TIME", NULL);
9191
pg_putenv("LANG",
9292
#ifndef WIN32
93-
NULL);
93+
NULL);
9494
#else
9595
/* On Windows the default locale cannot be English, so force it */
96-
"en");
96+
"en");
9797
#endif
9898
pg_putenv("LANGUAGE", NULL);
9999
pg_putenv("LC_ALL", NULL);

contrib/pg_upgrade/exec.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,17 @@ verify_directories(void)
9999

100100
if (access(".", R_OK | W_OK
101101
#ifndef WIN32
102+
102103
/*
103-
* Do a directory execute check only on Unix because execute permission
104-
* on NTFS means "can execute scripts", which we don't care about.
105-
* Also, X_OK is not defined in the Windows API.
104+
* Do a directory execute check only on Unix because execute permission on
105+
* NTFS means "can execute scripts", which we don't care about. Also, X_OK
106+
* is not defined in the Windows API.
106107
*/
107-
| X_OK
108+
| X_OK
108109
#endif
109-
) != 0)
110+
) != 0)
110111
pg_log(PG_FATAL,
111-
"You must have read and write access in the current directory.\n");
112+
"You must have read and write access in the current directory.\n");
112113

113114
check_bin_dir(&old_cluster);
114115
check_data_dir(old_cluster.pgdata);
@@ -132,16 +133,18 @@ check_data_dir(const char *pg_data)
132133
{
133134
char subDirName[MAXPGPATH];
134135
int subdirnum;
136+
135137
/* start check with top-most directory */
136138
const char *requiredSubdirs[] = {"", "base", "global", "pg_clog",
137139
"pg_multixact", "pg_subtrans", "pg_tblspc", "pg_twophase",
138-
"pg_xlog"};
140+
"pg_xlog"};
139141

140142
for (subdirnum = 0;
141143
subdirnum < sizeof(requiredSubdirs) / sizeof(requiredSubdirs[0]);
142144
++subdirnum)
143145
{
144146
struct stat statBuf;
147+
145148
snprintf(subDirName, sizeof(subDirName), "%s/%s", pg_data,
146149
requiredSubdirs[subdirnum]);
147150

@@ -173,8 +176,8 @@ check_bin_dir(ClusterInfo *cluster)
173176
report_status(PG_FATAL, "check for %s failed: %s\n",
174177
cluster->bindir, getErrorText(errno));
175178
else if (!S_ISDIR(statBuf.st_mode))
176-
report_status(PG_FATAL, "%s is not a directory\n",
177-
cluster->bindir);
179+
report_status(PG_FATAL, "%s is not a directory\n",
180+
cluster->bindir);
178181

179182
validate_exec(cluster->bindir, "postgres");
180183
validate_exec(cluster->bindir, "pg_ctl");

contrib/pg_upgrade/option.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ parseCommandLine(int argc, char *argv[])
158158
case 'u':
159159
pg_free(os_info.user);
160160
os_info.user = pg_strdup(optarg);
161+
161162
/*
162163
* Push the user name into the environment so pre-9.1
163164
* pg_ctl/libpq uses it.

contrib/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void *pg_malloc(int size);
378378
void pg_free(void *ptr);
379379
const char *getErrorText(int errNum);
380380
unsigned int str2uint(const char *str);
381-
void pg_putenv(const char *var, const char *val);
381+
void pg_putenv(const char *var, const char *val);
382382

383383

384384
/* version.c */

contrib/pg_upgrade/server.c

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ get_db_conn(ClusterInfo *cluster, const char *db_name)
5252
char conn_opts[MAXPGPATH];
5353

5454
snprintf(conn_opts, sizeof(conn_opts),
55-
"dbname = '%s' user = '%s' port = %d", db_name, os_info.user,
56-
cluster->port);
55+
"dbname = '%s' user = '%s' port = %d", db_name, os_info.user,
56+
cluster->port);
5757

5858
return PQconnectdb(conn_opts);
5959
}
@@ -146,16 +146,18 @@ start_postmaster(ClusterInfo *cluster)
146146
PGconn *conn;
147147
bool exit_hook_registered = false;
148148
int pg_ctl_return = 0;
149+
149150
#ifndef WIN32
150-
char *output_filename = log_opts.filename;
151+
char *output_filename = log_opts.filename;
151152
#else
153+
152154
/*
153155
* On Win32, we can't send both pg_upgrade output and pg_ctl output to the
154156
* same file because we get the error: "The process cannot access the file
155157
* because it is being used by another process." so we have to send all
156158
* other output to 'nul'.
157159
*/
158-
char *output_filename = DEVNULL;
160+
char *output_filename = DEVNULL;
159161
#endif
160162

161163
if (!exit_hook_registered)
@@ -180,13 +182,13 @@ start_postmaster(ClusterInfo *cluster)
180182
"-o \"-p %d %s\" start >> \"%s\" 2>&1" SYSTEMQUOTE,
181183
cluster->bindir, output_filename, cluster->pgdata, cluster->port,
182184
(cluster->controldata.cat_ver >=
183-
BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? "-b" :
184-
"-c autovacuum=off -c autovacuum_freeze_max_age=2000000000",
185+
BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? "-b" :
186+
"-c autovacuum=off -c autovacuum_freeze_max_age=2000000000",
185187
log_opts.filename);
186188

187189
/*
188-
* Don't throw an error right away, let connecting throw the error
189-
* because it might supply a reason for the failure.
190+
* Don't throw an error right away, let connecting throw the error because
191+
* it might supply a reason for the failure.
190192
*/
191193
pg_ctl_return = exec_prog(false, "%s", cmd);
192194

@@ -196,7 +198,7 @@ start_postmaster(ClusterInfo *cluster)
196198
{
197199
pg_log(PG_REPORT, "\nconnection to database failed: %s\n",
198200
PQerrorMessage(conn));
199-
if (conn)
201+
if (conn)
200202
PQfinish(conn);
201203
pg_log(PG_FATAL, "unable to connect to %s postmaster started with the command: %s\n",
202204
CLUSTER_NAME(cluster), cmd);
@@ -206,8 +208,8 @@ start_postmaster(ClusterInfo *cluster)
206208
/* If the connection didn't fail, fail now */
207209
if (pg_ctl_return != 0)
208210
pg_log(PG_FATAL, "pg_ctl failed to start the %s server\n",
209-
CLUSTER_NAME(cluster));
210-
211+
CLUSTER_NAME(cluster));
212+
211213
os_info.running_cluster = cluster;
212214
}
213215

@@ -218,11 +220,12 @@ stop_postmaster(bool fast)
218220
char cmd[MAXPGPATH];
219221
const char *bindir;
220222
const char *datadir;
223+
221224
#ifndef WIN32
222-
char *output_filename = log_opts.filename;
225+
char *output_filename = log_opts.filename;
223226
#else
224227
/* See comment in start_postmaster() about why win32 output is ignored. */
225-
char *output_filename = DEVNULL;
228+
char *output_filename = DEVNULL;
226229
#endif
227230

228231
if (os_info.running_cluster == &old_cluster)
@@ -268,17 +271,17 @@ check_pghost_envvar(void)
268271
for (option = start; option->keyword != NULL; option++)
269272
{
270273
if (option->envvar && (strcmp(option->envvar, "PGHOST") == 0 ||
271-
strcmp(option->envvar, "PGHOSTADDR") == 0))
274+
strcmp(option->envvar, "PGHOSTADDR") == 0))
272275
{
273276
const char *value = getenv(option->envvar);
274277

275278
if (value && strlen(value) > 0 &&
276-
/* check for 'local' host values */
279+
/* check for 'local' host values */
277280
(strcmp(value, "localhost") != 0 && strcmp(value, "127.0.0.1") != 0 &&
278281
strcmp(value, "::1") != 0 && value[0] != '/'))
279282
pg_log(PG_FATAL,
280-
"libpq environment variable %s has a non-local server value: %s\n",
281-
option->envvar, value);
283+
"libpq environment variable %s has a non-local server value: %s\n",
284+
option->envvar, value);
282285
}
283286
}
284287

contrib/pg_upgrade/util.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,3 @@ pg_putenv(const char *var, const char *val)
281281
#endif
282282
}
283283
}
284-

src/backend/access/gin/ginget.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ callConsistentFn(GinState *ginstate, GinScanKey key)
5656
key->recheckCurItem = true;
5757

5858
return DatumGetBool(FunctionCall8Coll(&ginstate->consistentFn[key->attnum - 1],
59-
ginstate->supportCollation[key->attnum - 1],
59+
ginstate->supportCollation[key->attnum - 1],
6060
PointerGetDatum(key->entryRes),
6161
UInt16GetDatum(key->strategy),
6262
key->query,
6363
UInt32GetDatum(key->nuserentries),
6464
PointerGetDatum(key->extra_data),
65-
PointerGetDatum(&key->recheckCurItem),
65+
PointerGetDatum(&key->recheckCurItem),
6666
PointerGetDatum(key->queryValues),
67-
PointerGetDatum(key->queryCategories)));
67+
PointerGetDatum(key->queryCategories)));
6868
}
6969

7070
/*
@@ -252,7 +252,7 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
252252
*----------
253253
*/
254254
cmp = DatumGetInt32(FunctionCall4Coll(&btree->ginstate->comparePartialFn[attnum - 1],
255-
btree->ginstate->supportCollation[attnum - 1],
255+
btree->ginstate->supportCollation[attnum - 1],
256256
scanEntry->queryKey,
257257
idatum,
258258
UInt16GetDatum(scanEntry->strategy),
@@ -1178,10 +1178,10 @@ matchPartialInPendingList(GinState *ginstate, Page page,
11781178
*----------
11791179
*/
11801180
cmp = DatumGetInt32(FunctionCall4Coll(&ginstate->comparePartialFn[entry->attnum - 1],
1181-
ginstate->supportCollation[entry->attnum - 1],
1181+
ginstate->supportCollation[entry->attnum - 1],
11821182
entry->queryKey,
11831183
datum[off - 1],
1184-
UInt16GetDatum(entry->strategy),
1184+
UInt16GetDatum(entry->strategy),
11851185
PointerGetDatum(entry->extra_data)));
11861186
if (cmp == 0)
11871187
return true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy