Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fdf5a5e

Browse files
committed
pgindent run for 8.3.
1 parent 3adc760 commit fdf5a5e

File tree

486 files changed

+10078
-9698
lines changed

Some content is hidden

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

486 files changed

+10078
-9698
lines changed

contrib/cube/cube.c

+52-50
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/******************************************************************************
2-
$PostgreSQL: pgsql/contrib/cube/cube.c,v 1.33 2007/06/05 21:31:03 tgl Exp $
2+
$PostgreSQL: pgsql/contrib/cube/cube.c,v 1.34 2007/11/15 21:14:29 momjian Exp $
33
44
This file contains routines that can be bound to a Postgres backend and
55
called by the backend in the process of processing queries. The calling
@@ -306,7 +306,7 @@ cube_subset(PG_FUNCTION_ARGS)
306306
result->x[i + dim] = c->x[dx[i] + c->dim - 1];
307307
}
308308

309-
PG_FREE_IF_COPY(c,0);
309+
PG_FREE_IF_COPY(c, 0);
310310
PG_RETURN_NDBOX(result);
311311
}
312312

@@ -360,7 +360,7 @@ cube_out(PG_FUNCTION_ARGS)
360360
appendStringInfoChar(&buf, ')');
361361
}
362362

363-
PG_FREE_IF_COPY(cube,0);
363+
PG_FREE_IF_COPY(cube, 0);
364364
PG_RETURN_CSTRING(buf.data);
365365
}
366366

@@ -381,20 +381,20 @@ g_cube_consistent(PG_FUNCTION_ARGS)
381381
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
382382
NDBOX *query = PG_GETARG_NDBOX(1);
383383
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
384-
bool res;
384+
bool res;
385385

386386
/*
387387
* if entry is not leaf, use g_cube_internal_consistent, else use
388388
* g_cube_leaf_consistent
389389
*/
390390
if (GIST_LEAF(entry))
391-
res = g_cube_leaf_consistent( DatumGetNDBOX(entry->key),
392-
query, strategy);
391+
res = g_cube_leaf_consistent(DatumGetNDBOX(entry->key),
392+
query, strategy);
393393
else
394-
res = g_cube_internal_consistent( DatumGetNDBOX(entry->key),
395-
query, strategy);
394+
res = g_cube_internal_consistent(DatumGetNDBOX(entry->key),
395+
query, strategy);
396396

397-
PG_FREE_IF_COPY(query,1);
397+
PG_FREE_IF_COPY(query, 1);
398398
PG_RETURN_BOOL(res);
399399
}
400400

@@ -451,14 +451,15 @@ Datum
451451
g_cube_decompress(PG_FUNCTION_ARGS)
452452
{
453453
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
454-
NDBOX *key = DatumGetNDBOX(PG_DETOAST_DATUM(entry->key));
454+
NDBOX *key = DatumGetNDBOX(PG_DETOAST_DATUM(entry->key));
455455

456456
if (key != DatumGetNDBOX(entry->key))
457457
{
458458
GISTENTRY *retval = (GISTENTRY *) palloc(sizeof(GISTENTRY));
459+
459460
gistentryinit(*retval, PointerGetDatum(key),
460-
entry->rel, entry->page,
461-
entry->offset, FALSE);
461+
entry->rel, entry->page,
462+
entry->offset, FALSE);
462463
PG_RETURN_POINTER(retval);
463464
}
464465
PG_RETURN_POINTER(entry);
@@ -479,8 +480,8 @@ g_cube_penalty(PG_FUNCTION_ARGS)
479480
double tmp1,
480481
tmp2;
481482

482-
ud = cube_union_v0( DatumGetNDBOX(origentry->key),
483-
DatumGetNDBOX(newentry->key));
483+
ud = cube_union_v0(DatumGetNDBOX(origentry->key),
484+
DatumGetNDBOX(newentry->key));
484485
rt_cube_size(ud, &tmp1);
485486
rt_cube_size(DatumGetNDBOX(origentry->key), &tmp2);
486487
*result = (float) (tmp1 - tmp2);
@@ -812,12 +813,12 @@ cube_union(PG_FUNCTION_ARGS)
812813
{
813814
NDBOX *a = PG_GETARG_NDBOX(0),
814815
*b = PG_GETARG_NDBOX(1);
815-
NDBOX *res;
816+
NDBOX *res;
816817

817818
res = cube_union_v0(a, b);
818819

819-
PG_FREE_IF_COPY(a,0);
820-
PG_FREE_IF_COPY(b,1);
820+
PG_FREE_IF_COPY(a, 0);
821+
PG_FREE_IF_COPY(b, 1);
821822
PG_RETURN_NDBOX(res);
822823
}
823824

@@ -876,8 +877,9 @@ cube_inter(PG_FUNCTION_ARGS)
876877
a->x[i + a->dim]), result->x[i + a->dim]);
877878
}
878879

879-
PG_FREE_IF_COPY(a,0);
880-
PG_FREE_IF_COPY(b,1);
880+
PG_FREE_IF_COPY(a, 0);
881+
PG_FREE_IF_COPY(b, 1);
882+
881883
/*
882884
* Is it OK to return a non-null intersection for non-overlapping boxes?
883885
*/
@@ -899,7 +901,7 @@ cube_size(PG_FUNCTION_ARGS)
899901
for (i = 0, j = a->dim; i < a->dim; i++, j++)
900902
result = result * Abs((a->x[j] - a->x[i]));
901903

902-
PG_FREE_IF_COPY(a,0);
904+
PG_FREE_IF_COPY(a, 0);
903905
PG_RETURN_FLOAT8(result);
904906
}
905907

@@ -1011,8 +1013,8 @@ cube_cmp(PG_FUNCTION_ARGS)
10111013

10121014
res = cube_cmp_v0(a, b);
10131015

1014-
PG_FREE_IF_COPY(a,0);
1015-
PG_FREE_IF_COPY(b,1);
1016+
PG_FREE_IF_COPY(a, 0);
1017+
PG_FREE_IF_COPY(b, 1);
10161018
PG_RETURN_INT32(res);
10171019
}
10181020

@@ -1026,8 +1028,8 @@ cube_eq(PG_FUNCTION_ARGS)
10261028

10271029
res = cube_cmp_v0(a, b);
10281030

1029-
PG_FREE_IF_COPY(a,0);
1030-
PG_FREE_IF_COPY(b,1);
1031+
PG_FREE_IF_COPY(a, 0);
1032+
PG_FREE_IF_COPY(b, 1);
10311033
PG_RETURN_BOOL(res == 0);
10321034
}
10331035

@@ -1041,8 +1043,8 @@ cube_ne(PG_FUNCTION_ARGS)
10411043

10421044
res = cube_cmp_v0(a, b);
10431045

1044-
PG_FREE_IF_COPY(a,0);
1045-
PG_FREE_IF_COPY(b,1);
1046+
PG_FREE_IF_COPY(a, 0);
1047+
PG_FREE_IF_COPY(b, 1);
10461048
PG_RETURN_BOOL(res != 0);
10471049
}
10481050

@@ -1056,8 +1058,8 @@ cube_lt(PG_FUNCTION_ARGS)
10561058

10571059
res = cube_cmp_v0(a, b);
10581060

1059-
PG_FREE_IF_COPY(a,0);
1060-
PG_FREE_IF_COPY(b,1);
1061+
PG_FREE_IF_COPY(a, 0);
1062+
PG_FREE_IF_COPY(b, 1);
10611063
PG_RETURN_BOOL(res < 0);
10621064
}
10631065

@@ -1071,8 +1073,8 @@ cube_gt(PG_FUNCTION_ARGS)
10711073

10721074
res = cube_cmp_v0(a, b);
10731075

1074-
PG_FREE_IF_COPY(a,0);
1075-
PG_FREE_IF_COPY(b,1);
1076+
PG_FREE_IF_COPY(a, 0);
1077+
PG_FREE_IF_COPY(b, 1);
10761078
PG_RETURN_BOOL(res > 0);
10771079
}
10781080

@@ -1086,8 +1088,8 @@ cube_le(PG_FUNCTION_ARGS)
10861088

10871089
res = cube_cmp_v0(a, b);
10881090

1089-
PG_FREE_IF_COPY(a,0);
1090-
PG_FREE_IF_COPY(b,1);
1091+
PG_FREE_IF_COPY(a, 0);
1092+
PG_FREE_IF_COPY(b, 1);
10911093
PG_RETURN_BOOL(res <= 0);
10921094
}
10931095

@@ -1101,8 +1103,8 @@ cube_ge(PG_FUNCTION_ARGS)
11011103

11021104
res = cube_cmp_v0(a, b);
11031105

1104-
PG_FREE_IF_COPY(a,0);
1105-
PG_FREE_IF_COPY(b,1);
1106+
PG_FREE_IF_COPY(a, 0);
1107+
PG_FREE_IF_COPY(b, 1);
11061108
PG_RETURN_BOOL(res >= 0);
11071109
}
11081110

@@ -1157,8 +1159,8 @@ cube_contains(PG_FUNCTION_ARGS)
11571159

11581160
res = cube_contains_v0(a, b);
11591161

1160-
PG_FREE_IF_COPY(a,0);
1161-
PG_FREE_IF_COPY(b,1);
1162+
PG_FREE_IF_COPY(a, 0);
1163+
PG_FREE_IF_COPY(b, 1);
11621164
PG_RETURN_BOOL(res);
11631165
}
11641166

@@ -1173,8 +1175,8 @@ cube_contained(PG_FUNCTION_ARGS)
11731175

11741176
res = cube_contains_v0(b, a);
11751177

1176-
PG_FREE_IF_COPY(a,0);
1177-
PG_FREE_IF_COPY(b,1);
1178+
PG_FREE_IF_COPY(a, 0);
1179+
PG_FREE_IF_COPY(b, 1);
11781180
PG_RETURN_BOOL(res);
11791181
}
11801182

@@ -1234,8 +1236,8 @@ cube_overlap(PG_FUNCTION_ARGS)
12341236

12351237
res = cube_overlap_v0(a, b);
12361238

1237-
PG_FREE_IF_COPY(a,0);
1238-
PG_FREE_IF_COPY(b,1);
1239+
PG_FREE_IF_COPY(a, 0);
1240+
PG_FREE_IF_COPY(b, 1);
12391241
PG_RETURN_BOOL(res);
12401242
}
12411243

@@ -1281,8 +1283,8 @@ cube_distance(PG_FUNCTION_ARGS)
12811283
distance += d * d;
12821284
}
12831285

1284-
PG_FREE_IF_COPY(a,0);
1285-
PG_FREE_IF_COPY(b,1);
1286+
PG_FREE_IF_COPY(a, 0);
1287+
PG_FREE_IF_COPY(b, 1);
12861288
PG_RETURN_FLOAT8(sqrt(distance));
12871289
}
12881290

@@ -1317,7 +1319,7 @@ cube_is_point(PG_FUNCTION_ARGS)
13171319
PG_RETURN_BOOL(FALSE);
13181320
}
13191321

1320-
PG_FREE_IF_COPY(a,0);
1322+
PG_FREE_IF_COPY(a, 0);
13211323
PG_RETURN_BOOL(TRUE);
13221324
}
13231325

@@ -1331,7 +1333,7 @@ cube_dim(PG_FUNCTION_ARGS)
13311333
c = PG_GETARG_NDBOX(0);
13321334
dim = c->dim;
13331335

1334-
PG_FREE_IF_COPY(c,0);
1336+
PG_FREE_IF_COPY(c, 0);
13351337
PG_RETURN_INT32(c->dim);
13361338
}
13371339

@@ -1350,7 +1352,7 @@ cube_ll_coord(PG_FUNCTION_ARGS)
13501352
if (c->dim >= n && n > 0)
13511353
result = Min(c->x[n - 1], c->x[c->dim + n - 1]);
13521354

1353-
PG_FREE_IF_COPY(c,0);
1355+
PG_FREE_IF_COPY(c, 0);
13541356
PG_RETURN_FLOAT8(result);
13551357
}
13561358

@@ -1369,7 +1371,7 @@ cube_ur_coord(PG_FUNCTION_ARGS)
13691371
if (c->dim >= n && n > 0)
13701372
result = Max(c->x[n - 1], c->x[c->dim + n - 1]);
13711373

1372-
PG_FREE_IF_COPY(c,0);
1374+
PG_FREE_IF_COPY(c, 0);
13731375
PG_RETURN_FLOAT8(result);
13741376
}
13751377

@@ -1384,7 +1386,7 @@ cube_enlarge(PG_FUNCTION_ARGS)
13841386
j,
13851387
k;
13861388
NDBOX *a;
1387-
double r;
1389+
double r;
13881390
int4 n;
13891391

13901392
a = PG_GETARG_NDBOX(0);
@@ -1426,7 +1428,7 @@ cube_enlarge(PG_FUNCTION_ARGS)
14261428
result->x[j] = r;
14271429
}
14281430

1429-
PG_FREE_IF_COPY(a,0);
1431+
PG_FREE_IF_COPY(a, 0);
14301432
PG_RETURN_NDBOX(result);
14311433
}
14321434

@@ -1490,7 +1492,7 @@ cube_c_f8(PG_FUNCTION_ARGS)
14901492
result->x[result->dim - 1] = x;
14911493
result->x[2 * result->dim - 1] = x;
14921494

1493-
PG_FREE_IF_COPY(c,0);
1495+
PG_FREE_IF_COPY(c, 0);
14941496
PG_RETURN_NDBOX(result);
14951497
}
14961498

@@ -1521,6 +1523,6 @@ cube_c_f8_f8(PG_FUNCTION_ARGS)
15211523
result->x[result->dim - 1] = x1;
15221524
result->x[2 * result->dim - 1] = x2;
15231525

1524-
PG_FREE_IF_COPY(c,0);
1526+
PG_FREE_IF_COPY(c, 0);
15251527
PG_RETURN_NDBOX(result);
15261528
}

contrib/dblink/dblink.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Darko Prenosil <Darko.Prenosil@finteh.hr>
99
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
1010
*
11-
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.65 2007/08/27 01:24:50 tgl Exp $
11+
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.66 2007/11/15 21:14:29 momjian Exp $
1212
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
1313
* ALL RIGHTS RESERVED;
1414
*
@@ -256,10 +256,10 @@ dblink_connect(PG_FUNCTION_ARGS)
256256
pfree(rconn);
257257

258258
ereport(ERROR,
259-
(errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
260-
errmsg("password is required"),
261-
errdetail("Non-superuser cannot connect if the server does not request a password."),
262-
errhint("Target server's authentication method must be changed.")));
259+
(errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
260+
errmsg("password is required"),
261+
errdetail("Non-superuser cannot connect if the server does not request a password."),
262+
errhint("Target server's authentication method must be changed.")));
263263
}
264264
}
265265

0 commit comments

Comments
 (0)