Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9d2977

Browse files
committed
Clean up newlines following left parentheses
We used to strategically place newlines after some function call leftparentheses to make pgindent move the argument list a few chars to theleft, so that the whole line would fit under 80 chars. However,pgindent no longer does that, so the newlines just made the codevertically longer for no reason. Remove those newlines, and reflow someof those lines for some extra naturality.Reviewed-by: Michael Paquier, Tom LaneDiscussion:https://postgr.es/m/20200129200401.GA6303@alvherre.pgsql
1 parent4e89c79 commitc9d2977

File tree

78 files changed

+342
-538
lines changed

Some content is hidden

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

78 files changed

+342
-538
lines changed

‎contrib/btree_gin/btree_gin.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ gin_btree_compare_prefix(FunctionCallInfo fcinfo)
114114
int32res,
115115
cmp;
116116

117-
cmp=DatumGetInt32(CallerFInfoFunctionCall2(
118-
data->typecmp,
117+
cmp=DatumGetInt32(CallerFInfoFunctionCall2(data->typecmp,
119118
fcinfo->flinfo,
120119
PG_GET_COLLATION(),
121120
(data->strategy==BTLessStrategyNumber||
@@ -463,8 +462,7 @@ gin_enum_cmp(PG_FUNCTION_ARGS)
463462
}
464463
else
465464
{
466-
res=DatumGetInt32(CallerFInfoFunctionCall2(
467-
enum_cmp,
465+
res=DatumGetInt32(CallerFInfoFunctionCall2(enum_cmp,
468466
fcinfo->flinfo,
469467
PG_GET_COLLATION(),
470468
ObjectIdGetDatum(a),

‎contrib/btree_gist/btree_cash.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
150150
key.lower= (GBT_NUMKEY*)&kkk->lower;
151151
key.upper= (GBT_NUMKEY*)&kkk->upper;
152152

153-
PG_RETURN_BOOL(
154-
gbt_num_consistent(&key, (void*)&query,&strategy,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
155-
);
153+
PG_RETURN_BOOL(gbt_num_consistent(&key, (void*)&query,&strategy,
154+
GIST_LEAF(entry),&tinfo,
155+
fcinfo->flinfo));
156156
}
157157

158158

@@ -169,9 +169,8 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
169169
key.lower= (GBT_NUMKEY*)&kkk->lower;
170170
key.upper= (GBT_NUMKEY*)&kkk->upper;
171171

172-
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
174-
);
172+
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),
173+
&tinfo,fcinfo->flinfo));
175174
}
176175

177176

@@ -202,11 +201,9 @@ gbt_cash_penalty(PG_FUNCTION_ARGS)
202201
Datum
203202
gbt_cash_picksplit(PG_FUNCTION_ARGS)
204203
{
205-
PG_RETURN_POINTER(gbt_num_picksplit(
206-
(GistEntryVector*)PG_GETARG_POINTER(0),
204+
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector*)PG_GETARG_POINTER(0),
207205
(GIST_SPLITVEC*)PG_GETARG_POINTER(1),
208-
&tinfo,fcinfo->flinfo
209-
));
206+
&tinfo,fcinfo->flinfo));
210207
}
211208

212209
Datum

‎contrib/btree_gist/btree_date.c

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,42 @@ PG_FUNCTION_INFO_V1(gbt_date_same);
2929
staticbool
3030
gbt_dategt(constvoid*a,constvoid*b,FmgrInfo*flinfo)
3131
{
32-
returnDatumGetBool(
33-
DirectFunctionCall2(date_gt,DateADTGetDatum(*((constDateADT*)a)),DateADTGetDatum(*((constDateADT*)b)))
34-
);
32+
returnDatumGetBool(DirectFunctionCall2(date_gt,
33+
DateADTGetDatum(*((constDateADT*)a)),
34+
DateADTGetDatum(*((constDateADT*)b))));
3535
}
3636

3737
staticbool
3838
gbt_datege(constvoid*a,constvoid*b,FmgrInfo*flinfo)
3939
{
40-
returnDatumGetBool(
41-
DirectFunctionCall2(date_ge,DateADTGetDatum(*((constDateADT*)a)),DateADTGetDatum(*((constDateADT*)b)))
42-
);
40+
returnDatumGetBool(DirectFunctionCall2(date_ge,
41+
DateADTGetDatum(*((constDateADT*)a)),
42+
DateADTGetDatum(*((constDateADT*)b))));
4343
}
4444

4545
staticbool
4646
gbt_dateeq(constvoid*a,constvoid*b,FmgrInfo*flinfo)
4747
{
48-
returnDatumGetBool(
49-
DirectFunctionCall2(date_eq,DateADTGetDatum(*((constDateADT*)a)),DateADTGetDatum(*((constDateADT*)b)))
48+
returnDatumGetBool(DirectFunctionCall2(date_eq,
49+
DateADTGetDatum(*((constDateADT*)a)),
50+
DateADTGetDatum(*((constDateADT*)b)))
5051
);
5152
}
5253

5354
staticbool
5455
gbt_datele(constvoid*a,constvoid*b,FmgrInfo*flinfo)
5556
{
56-
returnDatumGetBool(
57-
DirectFunctionCall2(date_le,DateADTGetDatum(*((constDateADT*)a)),DateADTGetDatum(*((constDateADT*)b)))
58-
);
57+
returnDatumGetBool(DirectFunctionCall2(date_le,
58+
DateADTGetDatum(*((constDateADT*)a)),
59+
DateADTGetDatum(*((constDateADT*)b))));
5960
}
6061

6162
staticbool
6263
gbt_datelt(constvoid*a,constvoid*b,FmgrInfo*flinfo)
6364
{
64-
returnDatumGetBool(
65-
DirectFunctionCall2(date_lt,DateADTGetDatum(*((constDateADT*)a)),DateADTGetDatum(*((constDateADT*)b)))
66-
);
65+
returnDatumGetBool(DirectFunctionCall2(date_lt,
66+
DateADTGetDatum(*((constDateADT*)a)),
67+
DateADTGetDatum(*((constDateADT*)b))));
6768
}
6869

6970

@@ -75,9 +76,13 @@ gbt_datekey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
7576
dateKEY*ib= (dateKEY*) (((constNsrt*)b)->t);
7677
intres;
7778

78-
res=DatumGetInt32(DirectFunctionCall2(date_cmp,DateADTGetDatum(ia->lower),DateADTGetDatum(ib->lower)));
79+
res=DatumGetInt32(DirectFunctionCall2(date_cmp,
80+
DateADTGetDatum(ia->lower),
81+
DateADTGetDatum(ib->lower)));
7982
if (res==0)
80-
returnDatumGetInt32(DirectFunctionCall2(date_cmp,DateADTGetDatum(ia->upper),DateADTGetDatum(ib->upper)));
83+
returnDatumGetInt32(DirectFunctionCall2(date_cmp,
84+
DateADTGetDatum(ia->upper),
85+
DateADTGetDatum(ib->upper)));
8186

8287
returnres;
8388
}
@@ -162,9 +167,9 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
162167
key.lower= (GBT_NUMKEY*)&kkk->lower;
163168
key.upper= (GBT_NUMKEY*)&kkk->upper;
164169

165-
PG_RETURN_BOOL(
166-
gbt_num_consistent(&key, (void*)&query,&strategy,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
167-
);
170+
PG_RETURN_BOOL(gbt_num_consistent(&key, (void*)&query,&strategy,
171+
GIST_LEAF(entry),&tinfo,
172+
fcinfo->flinfo));
168173
}
169174

170175

@@ -181,9 +186,8 @@ gbt_date_distance(PG_FUNCTION_ARGS)
181186
key.lower= (GBT_NUMKEY*)&kkk->lower;
182187
key.upper= (GBT_NUMKEY*)&kkk->upper;
183188

184-
PG_RETURN_FLOAT8(
185-
gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
186-
);
189+
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),
190+
&tinfo,fcinfo->flinfo));
187191
}
188192

189193

@@ -207,15 +211,13 @@ gbt_date_penalty(PG_FUNCTION_ARGS)
207211
int32diff,
208212
res;
209213

210-
diff=DatumGetInt32(DirectFunctionCall2(
211-
date_mi,
214+
diff=DatumGetInt32(DirectFunctionCall2(date_mi,
212215
DateADTGetDatum(newentry->upper),
213216
DateADTGetDatum(origentry->upper)));
214217

215218
res=Max(diff,0);
216219

217-
diff=DatumGetInt32(DirectFunctionCall2(
218-
date_mi,
220+
diff=DatumGetInt32(DirectFunctionCall2(date_mi,
219221
DateADTGetDatum(origentry->lower),
220222
DateADTGetDatum(newentry->lower)));
221223

@@ -225,8 +227,7 @@ gbt_date_penalty(PG_FUNCTION_ARGS)
225227

226228
if (res>0)
227229
{
228-
diff=DatumGetInt32(DirectFunctionCall2(
229-
date_mi,
230+
diff=DatumGetInt32(DirectFunctionCall2(date_mi,
230231
DateADTGetDatum(origentry->upper),
231232
DateADTGetDatum(origentry->lower)));
232233
*result+=FLT_MIN;
@@ -241,11 +242,9 @@ gbt_date_penalty(PG_FUNCTION_ARGS)
241242
Datum
242243
gbt_date_picksplit(PG_FUNCTION_ARGS)
243244
{
244-
PG_RETURN_POINTER(gbt_num_picksplit(
245-
(GistEntryVector*)PG_GETARG_POINTER(0),
245+
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector*)PG_GETARG_POINTER(0),
246246
(GIST_SPLITVEC*)PG_GETARG_POINTER(1),
247-
&tinfo,fcinfo->flinfo
248-
));
247+
&tinfo,fcinfo->flinfo));
249248
}
250249

251250
Datum

‎contrib/btree_gist/btree_enum.c

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ PG_FUNCTION_INFO_V1(gbt_enum_same);
3131
staticbool
3232
gbt_enumgt(constvoid*a,constvoid*b,FmgrInfo*flinfo)
3333
{
34-
returnDatumGetBool(
35-
CallerFInfoFunctionCall2(enum_gt,flinfo,InvalidOid,ObjectIdGetDatum(*((constOid*)a)),ObjectIdGetDatum(*((constOid*)b)))
36-
);
34+
returnDatumGetBool(CallerFInfoFunctionCall2(enum_gt,flinfo,InvalidOid,
35+
ObjectIdGetDatum(*((constOid*)a)),
36+
ObjectIdGetDatum(*((constOid*)b))));
3737
}
3838
staticbool
3939
gbt_enumge(constvoid*a,constvoid*b,FmgrInfo*flinfo)
4040
{
41-
returnDatumGetBool(
42-
CallerFInfoFunctionCall2(enum_ge,flinfo,InvalidOid,ObjectIdGetDatum(*((constOid*)a)),ObjectIdGetDatum(*((constOid*)b)))
43-
);
41+
returnDatumGetBool(CallerFInfoFunctionCall2(enum_ge,flinfo,InvalidOid,
42+
ObjectIdGetDatum(*((constOid*)a)),
43+
ObjectIdGetDatum(*((constOid*)b))));
4444
}
4545
staticbool
4646
gbt_enumeq(constvoid*a,constvoid*b,FmgrInfo*flinfo)
@@ -50,16 +50,16 @@ gbt_enumeq(const void *a, const void *b, FmgrInfo *flinfo)
5050
staticbool
5151
gbt_enumle(constvoid*a,constvoid*b,FmgrInfo*flinfo)
5252
{
53-
returnDatumGetBool(
54-
CallerFInfoFunctionCall2(enum_le,flinfo,InvalidOid,ObjectIdGetDatum(*((constOid*)a)),ObjectIdGetDatum(*((constOid*)b)))
55-
);
53+
returnDatumGetBool(CallerFInfoFunctionCall2(enum_le,flinfo,InvalidOid,
54+
ObjectIdGetDatum(*((constOid*)a)),
55+
ObjectIdGetDatum(*((constOid*)b))));
5656
}
5757
staticbool
5858
gbt_enumlt(constvoid*a,constvoid*b,FmgrInfo*flinfo)
5959
{
60-
returnDatumGetBool(
61-
CallerFInfoFunctionCall2(enum_lt,flinfo,InvalidOid,ObjectIdGetDatum(*((constOid*)a)),ObjectIdGetDatum(*((constOid*)b)))
62-
);
60+
returnDatumGetBool(CallerFInfoFunctionCall2(enum_lt,flinfo,InvalidOid,
61+
ObjectIdGetDatum(*((constOid*)a)),
62+
ObjectIdGetDatum(*((constOid*)b))));
6363
}
6464

6565
staticint
@@ -73,14 +73,14 @@ gbt_enumkey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
7373
if (ia->upper==ib->upper)
7474
return0;
7575

76-
returnDatumGetInt32(
77-
CallerFInfoFunctionCall2(enum_cmp,flinfo,InvalidOid,ObjectIdGetDatum(ia->upper),ObjectIdGetDatum(ib->upper))
78-
);
76+
returnDatumGetInt32(CallerFInfoFunctionCall2(enum_cmp,flinfo,InvalidOid,
77+
ObjectIdGetDatum(ia->upper),
78+
ObjectIdGetDatum(ib->upper)));
7979
}
8080

81-
returnDatumGetInt32(
82-
CallerFInfoFunctionCall2(enum_cmp,flinfo,InvalidOid,ObjectIdGetDatum(ia->lower),ObjectIdGetDatum(ib->lower))
83-
);
81+
returnDatumGetInt32(CallerFInfoFunctionCall2(enum_cmp,flinfo,InvalidOid,
82+
ObjectIdGetDatum(ia->lower),
83+
ObjectIdGetDatum(ib->lower)));
8484
}
8585

8686
staticconstgbtree_ninfotinfo=
@@ -137,9 +137,9 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
137137
key.lower= (GBT_NUMKEY*)&kkk->lower;
138138
key.upper= (GBT_NUMKEY*)&kkk->upper;
139139

140-
PG_RETURN_BOOL(
141-
gbt_num_consistent(&key, (void*)&query,&strategy,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
142-
);
140+
PG_RETURN_BOOL(gbt_num_consistent(&key, (void*)&query,&strategy,
141+
GIST_LEAF(entry),&tinfo,
142+
fcinfo->flinfo));
143143
}
144144

145145
Datum
@@ -168,11 +168,9 @@ gbt_enum_penalty(PG_FUNCTION_ARGS)
168168
Datum
169169
gbt_enum_picksplit(PG_FUNCTION_ARGS)
170170
{
171-
PG_RETURN_POINTER(gbt_num_picksplit(
172-
(GistEntryVector*)PG_GETARG_POINTER(0),
171+
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector*)PG_GETARG_POINTER(0),
173172
(GIST_SPLITVEC*)PG_GETARG_POINTER(1),
174-
&tinfo,fcinfo->flinfo
175-
));
173+
&tinfo,fcinfo->flinfo));
176174
}
177175

178176
Datum

‎contrib/btree_gist/btree_float4.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
143143
key.lower= (GBT_NUMKEY*)&kkk->lower;
144144
key.upper= (GBT_NUMKEY*)&kkk->upper;
145145

146-
PG_RETURN_BOOL(
147-
gbt_num_consistent(&key, (void*)&query,&strategy,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
148-
);
146+
PG_RETURN_BOOL(gbt_num_consistent(&key, (void*)&query,&strategy,
147+
GIST_LEAF(entry),&tinfo,
148+
fcinfo->flinfo));
149149
}
150150

151151

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

165-
PG_RETURN_FLOAT8(
166-
gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
167-
);
165+
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),
166+
&tinfo,fcinfo->flinfo));
168167
}
169168

170169

@@ -195,11 +194,9 @@ gbt_float4_penalty(PG_FUNCTION_ARGS)
195194
Datum
196195
gbt_float4_picksplit(PG_FUNCTION_ARGS)
197196
{
198-
PG_RETURN_POINTER(gbt_num_picksplit(
199-
(GistEntryVector*)PG_GETARG_POINTER(0),
197+
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector*)PG_GETARG_POINTER(0),
200198
(GIST_SPLITVEC*)PG_GETARG_POINTER(1),
201-
&tinfo,fcinfo->flinfo
202-
));
199+
&tinfo,fcinfo->flinfo));
203200
}
204201

205202
Datum

‎contrib/btree_gist/btree_float8.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
150150
key.lower= (GBT_NUMKEY*)&kkk->lower;
151151
key.upper= (GBT_NUMKEY*)&kkk->upper;
152152

153-
PG_RETURN_BOOL(
154-
gbt_num_consistent(&key, (void*)&query,&strategy,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
155-
);
153+
PG_RETURN_BOOL(gbt_num_consistent(&key, (void*)&query,&strategy,
154+
GIST_LEAF(entry),&tinfo,
155+
fcinfo->flinfo));
156156
}
157157

158158

@@ -169,9 +169,8 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
169169
key.lower= (GBT_NUMKEY*)&kkk->lower;
170170
key.upper= (GBT_NUMKEY*)&kkk->upper;
171171

172-
PG_RETURN_FLOAT8(
173-
gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),&tinfo,fcinfo->flinfo)
174-
);
172+
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void*)&query,GIST_LEAF(entry),
173+
&tinfo,fcinfo->flinfo));
175174
}
176175

177176

@@ -202,11 +201,9 @@ gbt_float8_penalty(PG_FUNCTION_ARGS)
202201
Datum
203202
gbt_float8_picksplit(PG_FUNCTION_ARGS)
204203
{
205-
PG_RETURN_POINTER(gbt_num_picksplit(
206-
(GistEntryVector*)PG_GETARG_POINTER(0),
204+
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector*)PG_GETARG_POINTER(0),
207205
(GIST_SPLITVEC*)PG_GETARG_POINTER(1),
208-
&tinfo,fcinfo->flinfo
209-
));
206+
&tinfo,fcinfo->flinfo));
210207
}
211208

212209
Datum

‎contrib/btree_gist/btree_inet.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,9 @@ gbt_inet_penalty(PG_FUNCTION_ARGS)
171171
Datum
172172
gbt_inet_picksplit(PG_FUNCTION_ARGS)
173173
{
174-
PG_RETURN_POINTER(gbt_num_picksplit(
175-
(GistEntryVector*)PG_GETARG_POINTER(0),
174+
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector*)PG_GETARG_POINTER(0),
176175
(GIST_SPLITVEC*)PG_GETARG_POINTER(1),
177-
&tinfo,fcinfo->flinfo
178-
));
176+
&tinfo,fcinfo->flinfo));
179177
}
180178

181179
Datum

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp