Skip to content

Commit bf50caf

Browse files
committed
pgindent run before PG 9.1 beta 1.
1 parent 9a8b731 commit bf50caf

File tree

446 files changed

+5742
-5263
lines changed

Some content is hidden

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

446 files changed

+5742
-5263
lines changed

contrib/adminpack/adminpack.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,19 @@ convert_and_check_filename(text *arg, bool logAllowed)
7878
/* Disallow '/a/b/data/..' */
7979
if (path_contains_parent_reference(filename))
8080
ereport(ERROR,
81-
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
82-
(errmsg("reference to parent directory (\"..\") not allowed"))));
81+
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
82+
(errmsg("reference to parent directory (\"..\") not allowed"))));
83+
8384
/*
84-
* Allow absolute paths if within DataDir or Log_directory, even
85-
* though Log_directory might be outside DataDir.
85+
* Allow absolute paths if within DataDir or Log_directory, even
86+
* though Log_directory might be outside DataDir.
8687
*/
8788
if (!path_is_prefix_of_path(DataDir, filename) &&
8889
(!logAllowed || !is_absolute_path(Log_directory) ||
8990
!path_is_prefix_of_path(Log_directory, filename)))
9091
ereport(ERROR,
91-
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
92-
(errmsg("absolute path not allowed"))));
92+
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
93+
(errmsg("absolute path not allowed"))));
9394
}
9495
else if (!path_is_relative_and_below_cwd(filename))
9596
ereport(ERROR,

contrib/auth_delay/auth_delay.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818

1919
PG_MODULE_MAGIC;
2020

21-
void _PG_init(void);
21+
void _PG_init(void);
2222

2323
/* GUC Variables */
2424
static int auth_delay_milliseconds;
2525

2626
/* Original Hook */
27-
static ClientAuthentication_hook_type original_client_auth_hook = NULL;
27+
static ClientAuthentication_hook_type original_client_auth_hook = NULL;
2828

2929
/*
3030
* Check authentication
@@ -55,7 +55,7 @@ _PG_init(void)
5555
{
5656
/* Define custom GUC variables */
5757
DefineCustomIntVariable("auth_delay.milliseconds",
58-
"Milliseconds to delay before reporting authentication failure",
58+
"Milliseconds to delay before reporting authentication failure",
5959
NULL,
6060
&auth_delay_milliseconds,
6161
0,

contrib/btree_gist/btree_cash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
169169
key.upper = (GBT_NUMKEY *) &kkk->upper;
170170

171171
PG_RETURN_FLOAT8(
172-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
172+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
173173
);
174174
}
175175

contrib/btree_gist/btree_date.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ static float8
9090
gdb_date_dist(const void *a, const void *b)
9191
{
9292
/* we assume the difference can't overflow */
93-
Datum diff = DirectFunctionCall2(date_mi,
93+
Datum diff = DirectFunctionCall2(date_mi,
9494
DateADTGetDatum(*((const DateADT *) a)),
95-
DateADTGetDatum(*((const DateADT *) b)));
95+
DateADTGetDatum(*((const DateADT *) b)));
9696

9797
return (float8) Abs(DatumGetInt32(diff));
9898
}
@@ -113,14 +113,14 @@ static const gbtree_ninfo tinfo =
113113

114114

115115
PG_FUNCTION_INFO_V1(date_dist);
116-
Datum date_dist(PG_FUNCTION_ARGS);
116+
Datum date_dist(PG_FUNCTION_ARGS);
117117
Datum
118118
date_dist(PG_FUNCTION_ARGS)
119119
{
120120
/* we assume the difference can't overflow */
121-
Datum diff = DirectFunctionCall2(date_mi,
122-
PG_GETARG_DATUM(0),
123-
PG_GETARG_DATUM(1));
121+
Datum diff = DirectFunctionCall2(date_mi,
122+
PG_GETARG_DATUM(0),
123+
PG_GETARG_DATUM(1));
124124

125125
PG_RETURN_INT32(Abs(DatumGetInt32(diff)));
126126
}
@@ -181,7 +181,7 @@ gbt_date_distance(PG_FUNCTION_ARGS)
181181
key.upper = (GBT_NUMKEY *) &kkk->upper;
182182

183183
PG_RETURN_FLOAT8(
184-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
184+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
185185
);
186186
}
187187

contrib/btree_gist/btree_float4.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,18 @@ static const gbtree_ninfo tinfo =
9494

9595

9696
PG_FUNCTION_INFO_V1(float4_dist);
97-
Datum float4_dist(PG_FUNCTION_ARGS);
97+
Datum float4_dist(PG_FUNCTION_ARGS);
9898
Datum
9999
float4_dist(PG_FUNCTION_ARGS)
100100
{
101-
float4 a = PG_GETARG_FLOAT4(0);
101+
float4 a = PG_GETARG_FLOAT4(0);
102102
float4 b = PG_GETARG_FLOAT4(1);
103103
float4 r;
104104

105105
r = a - b;
106106
CHECKFLOATVAL(r, isinf(a) || isinf(b), true);
107107

108-
PG_RETURN_FLOAT4( Abs(r) );
108+
PG_RETURN_FLOAT4(Abs(r));
109109
}
110110

111111

@@ -162,7 +162,7 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
162162
key.upper = (GBT_NUMKEY *) &kkk->upper;
163163

164164
PG_RETURN_FLOAT8(
165-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
165+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
166166
);
167167
}
168168

contrib/btree_gist/btree_float8.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ gbt_float8key_cmp(const void *a, const void *b)
7676
static float8
7777
gbt_float8_dist(const void *a, const void *b)
7878
{
79-
float8 arg1 = *(const float8 *)a;
80-
float8 arg2 = *(const float8 *)b;
79+
float8 arg1 = *(const float8 *) a;
80+
float8 arg2 = *(const float8 *) b;
8181
float8 r;
8282

8383
r = arg1 - arg2;
@@ -102,7 +102,7 @@ static const gbtree_ninfo tinfo =
102102

103103

104104
PG_FUNCTION_INFO_V1(float8_dist);
105-
Datum float8_dist(PG_FUNCTION_ARGS);
105+
Datum float8_dist(PG_FUNCTION_ARGS);
106106
Datum
107107
float8_dist(PG_FUNCTION_ARGS)
108108
{
@@ -113,7 +113,7 @@ float8_dist(PG_FUNCTION_ARGS)
113113
r = a - b;
114114
CHECKFLOATVAL(r, isinf(a) || isinf(b), true);
115115

116-
PG_RETURN_FLOAT8( Abs(r) );
116+
PG_RETURN_FLOAT8(Abs(r));
117117
}
118118

119119
/**************************************************
@@ -169,7 +169,7 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
169169
key.upper = (GBT_NUMKEY *) &kkk->upper;
170170

171171
PG_RETURN_FLOAT8(
172-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
172+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
173173
);
174174
}
175175

contrib/btree_gist/btree_int2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ static const gbtree_ninfo tinfo =
9494

9595

9696
PG_FUNCTION_INFO_V1(int2_dist);
97-
Datum int2_dist(PG_FUNCTION_ARGS);
97+
Datum int2_dist(PG_FUNCTION_ARGS);
9898
Datum
9999
int2_dist(PG_FUNCTION_ARGS)
100100
{
101-
int2 a = PG_GETARG_INT16(0);
102-
int2 b = PG_GETARG_INT16(1);
101+
int2 a = PG_GETARG_INT16(0);
102+
int2 b = PG_GETARG_INT16(1);
103103
int2 r;
104104
int2 ra;
105105

@@ -169,7 +169,7 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
169169
key.upper = (GBT_NUMKEY *) &kkk->upper;
170170

171171
PG_RETURN_FLOAT8(
172-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
172+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
173173
);
174174
}
175175

contrib/btree_gist/btree_int4.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ static const gbtree_ninfo tinfo =
9595

9696

9797
PG_FUNCTION_INFO_V1(int4_dist);
98-
Datum int4_dist(PG_FUNCTION_ARGS);
98+
Datum int4_dist(PG_FUNCTION_ARGS);
9999
Datum
100100
int4_dist(PG_FUNCTION_ARGS)
101101
{
102-
int4 a = PG_GETARG_INT32(0);
103-
int4 b = PG_GETARG_INT32(1);
104-
int4 r;
105-
int4 ra;
102+
int4 a = PG_GETARG_INT32(0);
103+
int4 b = PG_GETARG_INT32(1);
104+
int4 r;
105+
int4 ra;
106106

107107
r = a - b;
108108
ra = Abs(r);
@@ -111,7 +111,7 @@ int4_dist(PG_FUNCTION_ARGS)
111111
if (ra < 0 || (!SAMESIGN(a, b) && !SAMESIGN(r, a)))
112112
ereport(ERROR,
113113
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
114-
errmsg("integer out of range")));
114+
errmsg("integer out of range")));
115115

116116
PG_RETURN_INT32(ra);
117117
}
@@ -170,7 +170,7 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172172
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
173+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
174174
);
175175
}
176176

contrib/btree_gist/btree_int8.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ static const gbtree_ninfo tinfo =
9595

9696

9797
PG_FUNCTION_INFO_V1(int8_dist);
98-
Datum int8_dist(PG_FUNCTION_ARGS);
98+
Datum int8_dist(PG_FUNCTION_ARGS);
9999
Datum
100100
int8_dist(PG_FUNCTION_ARGS)
101101
{
102-
int64 a = PG_GETARG_INT64(0);
103-
int64 b = PG_GETARG_INT64(1);
104-
int64 r;
105-
int64 ra;
102+
int64 a = PG_GETARG_INT64(0);
103+
int64 b = PG_GETARG_INT64(1);
104+
int64 r;
105+
int64 ra;
106106

107107
r = a - b;
108108
ra = Abs(r);
@@ -111,7 +111,7 @@ int8_dist(PG_FUNCTION_ARGS)
111111
if (ra < 0 || (!SAMESIGN(a, b) && !SAMESIGN(r, a)))
112112
ereport(ERROR,
113113
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
114-
errmsg("bigint out of range")));
114+
errmsg("bigint out of range")));
115115

116116
PG_RETURN_INT64(ra);
117117
}
@@ -170,7 +170,7 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172172
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
173+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
174174
);
175175
}
176176

contrib/btree_gist/btree_interval.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ intr2num(const Interval *i)
8888
static float8
8989
gbt_intv_dist(const void *a, const void *b)
9090
{
91-
return (float8)Abs(intr2num((Interval*)a) - intr2num((Interval*)b));
91+
return (float8) Abs(intr2num((Interval *) a) - intr2num((Interval *) b));
9292
}
9393

9494
/*
@@ -127,7 +127,7 @@ abs_interval(Interval *a)
127127
}
128128

129129
PG_FUNCTION_INFO_V1(interval_dist);
130-
Datum interval_dist(PG_FUNCTION_ARGS);
130+
Datum interval_dist(PG_FUNCTION_ARGS);
131131
Datum
132132
interval_dist(PG_FUNCTION_ARGS)
133133
{
@@ -240,7 +240,7 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
240240
key.upper = (GBT_NUMKEY *) &kkk->upper;
241241

242242
PG_RETURN_FLOAT8(
243-
gbt_num_distance(&key, (void *) query, GIST_LEAF(entry), &tinfo)
243+
gbt_num_distance(&key, (void *) query, GIST_LEAF(entry), &tinfo)
244244
);
245245
}
246246

contrib/btree_gist/btree_oid.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ static const gbtree_ninfo tinfo =
101101

102102

103103
PG_FUNCTION_INFO_V1(oid_dist);
104-
Datum oid_dist(PG_FUNCTION_ARGS);
104+
Datum oid_dist(PG_FUNCTION_ARGS);
105105
Datum
106106
oid_dist(PG_FUNCTION_ARGS)
107107
{
108-
Oid a = PG_GETARG_OID(0);
109-
Oid b = PG_GETARG_OID(1);
110-
Oid res;
108+
Oid a = PG_GETARG_OID(0);
109+
Oid b = PG_GETARG_OID(1);
110+
Oid res;
111111

112112
if (a < b)
113113
res = b - a;
@@ -170,7 +170,7 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172172
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
173+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
174174
);
175175
}
176176

contrib/btree_gist/btree_time.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ gbt_time_dist(const void *a, const void *b)
119119
{
120120
const TimeADT *aa = (const TimeADT *) a;
121121
const TimeADT *bb = (const TimeADT *) b;
122-
Interval *i;
122+
Interval *i;
123123

124124
i = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
125125
TimeADTGetDatumFast(*aa),
@@ -143,7 +143,7 @@ static const gbtree_ninfo tinfo =
143143

144144

145145
PG_FUNCTION_INFO_V1(time_dist);
146-
Datum time_dist(PG_FUNCTION_ARGS);
146+
Datum time_dist(PG_FUNCTION_ARGS);
147147
Datum
148148
time_dist(PG_FUNCTION_ARGS)
149149
{
@@ -239,7 +239,7 @@ gbt_time_distance(PG_FUNCTION_ARGS)
239239
key.upper = (GBT_NUMKEY *) &kkk->upper;
240240

241241
PG_RETURN_FLOAT8(
242-
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
242+
gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo)
243243
);
244244
}
245245

0 commit comments

Comments
 (0)