Skip to content

Commit f0239b5

Browse files
author
Artur Zakirov
committed
Run pgindent on extension
1 parent ea9f27b commit f0239b5

17 files changed

+939
-836
lines changed

rum.h

Lines changed: 110 additions & 109 deletions
Large diffs are not rendered by default.

rum_timestamp.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212

1313
typedef struct QueryInfo
1414
{
15-
StrategyNumber strategy;
16-
Datum datum;
15+
StrategyNumber strategy;
16+
Datum datum;
1717
} QueryInfo;
1818

1919

2020
PG_FUNCTION_INFO_V1(rum_timestamp_extract_value);
2121
Datum
2222
rum_timestamp_extract_value(PG_FUNCTION_ARGS)
2323
{
24-
Datum datum = PG_GETARG_DATUM(0);
25-
int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
26-
Datum *entries = (Datum *) palloc(sizeof(Datum));
24+
Datum datum = PG_GETARG_DATUM(0);
25+
int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
26+
Datum *entries = (Datum *) palloc(sizeof(Datum));
2727

2828
entries[0] = datum;
2929
*nentries = 1;
@@ -35,12 +35,12 @@ PG_FUNCTION_INFO_V1(rum_timestamp_extract_query);
3535
Datum
3636
rum_timestamp_extract_query(PG_FUNCTION_ARGS)
3737
{
38-
Datum datum = PG_GETARG_DATUM(0);
39-
int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
38+
Datum datum = PG_GETARG_DATUM(0);
39+
int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
4040
StrategyNumber strategy = PG_GETARG_UINT16(2);
4141
bool **partialmatch = (bool **) PG_GETARG_POINTER(3);
4242
Pointer **extra_data = (Pointer **) PG_GETARG_POINTER(4);
43-
Datum *entries = (Datum *) palloc(sizeof(Datum));
43+
Datum *entries = (Datum *) palloc(sizeof(Datum));
4444
QueryInfo *data = (QueryInfo *) palloc(sizeof(QueryInfo));
4545
bool *ptr_partialmatch;
4646

@@ -52,7 +52,7 @@ rum_timestamp_extract_query(PG_FUNCTION_ARGS)
5252
*extra_data = (Pointer *) palloc(sizeof(Pointer));
5353
**extra_data = (Pointer) data;
5454

55-
switch(strategy)
55+
switch (strategy)
5656
{
5757
case BTLessStrategyNumber:
5858
case BTLessEqualStrategyNumber:
@@ -79,16 +79,17 @@ PG_FUNCTION_INFO_V1(rum_timestamp_compare_prefix);
7979
Datum
8080
rum_timestamp_compare_prefix(PG_FUNCTION_ARGS)
8181
{
82-
Datum a = PG_GETARG_DATUM(0);
83-
Datum b = PG_GETARG_DATUM(1);
82+
Datum a = PG_GETARG_DATUM(0);
83+
Datum b = PG_GETARG_DATUM(1);
8484
QueryInfo *data = (QueryInfo *) PG_GETARG_POINTER(3);
85-
int32 res, cmp;
85+
int32 res,
86+
cmp;
8687

8788
cmp = DatumGetInt32(DirectFunctionCall2Coll(timestamp_cmp,
8889
PG_GET_COLLATION(),
89-
(data->strategy == BTLessStrategyNumber ||
90+
(data->strategy == BTLessStrategyNumber ||
9091
data->strategy == BTLessEqualStrategyNumber)
91-
? data->datum : a, b));
92+
? data->datum : a, b));
9293

9394
switch (data->strategy)
9495
{
@@ -141,7 +142,7 @@ PG_FUNCTION_INFO_V1(rum_timestamp_consistent);
141142
Datum
142143
rum_timestamp_consistent(PG_FUNCTION_ARGS)
143144
{
144-
bool *recheck = (bool *) PG_GETARG_POINTER(5);
145+
bool *recheck = (bool *) PG_GETARG_POINTER(5);
145146

146147
*recheck = false;
147148
PG_RETURN_BOOL(true);
@@ -226,10 +227,10 @@ PG_FUNCTION_INFO_V1(rum_timestamp_outer_distance);
226227
Datum
227228
rum_timestamp_outer_distance(PG_FUNCTION_ARGS)
228229
{
229-
StrategyNumber strategy = PG_GETARG_UINT16(2);
230+
StrategyNumber strategy = PG_GETARG_UINT16(2);
230231
Datum diff;
231232

232-
switch(strategy)
233+
switch (strategy)
233234
{
234235
case RUM_TMST_DISTANCE:
235236
diff = DirectFunctionCall2(timestamp_distance,
@@ -253,4 +254,3 @@ rum_timestamp_outer_distance(PG_FUNCTION_ARGS)
253254

254255
PG_RETURN_DATUM(diff);
255256
}
256-

0 commit comments

Comments
 (0)