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

Commit4bc424b

Browse files
committed
pgindent run for 9.6
1 parent9164dee commit4bc424b

File tree

252 files changed

+2666
-2554
lines changed

Some content is hidden

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

252 files changed

+2666
-2554
lines changed

‎contrib/auto_explain/auto_explain.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,16 @@ _PG_init(void)
165165

166166
DefineCustomRealVariable("auto_explain.sample_rate",
167167
"Fraction of queries to process.",
168-
NULL,
169-
&auto_explain_sample_rate,
170-
1.0,
171-
0.0,
172-
1.0,
173-
PGC_SUSET,
174-
0,
175-
NULL,
176-
NULL,
177-
NULL);
168+
NULL,
169+
&auto_explain_sample_rate,
170+
1.0,
171+
0.0,
172+
1.0,
173+
PGC_SUSET,
174+
0,
175+
NULL,
176+
NULL,
177+
NULL);
178178

179179
EmitWarningsOnPlaceholders("auto_explain");
180180

@@ -209,12 +209,12 @@ static void
209209
explain_ExecutorStart(QueryDesc*queryDesc,inteflags)
210210
{
211211
/*
212-
* For rate sampling, randomly choose top-level statement. Either
213-
*allnested statements will be explained or none will.
212+
* For rate sampling, randomly choose top-level statement. Either all
213+
* nested statements will be explained or none will.
214214
*/
215215
if (auto_explain_log_min_duration >=0&&nesting_level==0)
216216
current_query_sampled= (random()<auto_explain_sample_rate*
217-
MAX_RANDOM_VALUE);
217+
MAX_RANDOM_VALUE);
218218

219219
if (auto_explain_enabled()&&current_query_sampled)
220220
{

‎contrib/bloom/blinsert.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ PG_MODULE_MAGIC;
3333
typedefstruct
3434
{
3535
BloomStateblstate;/* bloom index state */
36-
MemoryContexttmpCtx;/* temporary memory context reset after
37-
*eachtuple */
36+
MemoryContexttmpCtx;/* temporary memory context reset after each
37+
* tuple */
3838
chardata[BLCKSZ];/* cached page */
3939
int64count;/* number of tuples in cached page */
40-
}BloomBuildState;
40+
}BloomBuildState;
4141

4242
/*
4343
* Flush page cached in BloomBuildState.
@@ -140,8 +140,8 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
140140
bloomBuildCallback, (void*)&buildstate);
141141

142142
/*
143-
* There are could be some items in cached page. Flush this page
144-
*ifneeded.
143+
* There are could be some items in cached page. Flush this page if
144+
* needed.
145145
*/
146146
if (buildstate.count>0)
147147
flushCachedPage(index,&buildstate);

‎contrib/bloom/bloom.h

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@
3131
/* Opaque for bloom pages */
3232
typedefstructBloomPageOpaqueData
3333
{
34-
OffsetNumbermaxoff;/* number of index tuples on page */
35-
uint16flags;/* see bit definitions below */
36-
uint16unused;/* placeholder to force maxaligning of size
37-
* of BloomPageOpaqueData and to place
38-
* bloom_page_id exactly at the end of page
39-
*/
40-
uint16bloom_page_id;/* for identification of BLOOM indexes */
41-
}BloomPageOpaqueData;
34+
OffsetNumbermaxoff;/* number of index tuples on page */
35+
uint16flags;/* see bit definitions below */
36+
uint16unused;/* placeholder to force maxaligning of size of
37+
* BloomPageOpaqueData and to place
38+
* bloom_page_id exactly at the end of page */
39+
uint16bloom_page_id;/* for identification of BLOOM indexes */
40+
}BloomPageOpaqueData;
4241

4342
typedefBloomPageOpaqueData*BloomPageOpaque;
4443

@@ -102,9 +101,9 @@ typedef struct BloomOptions
102101
{
103102
int32vl_len_;/* varlena header (do not touch directly!) */
104103
intbloomLength;/* length of signature in words (not bits!) */
105-
intbitSize[INDEX_MAX_KEYS];/* # of bits generated for each
106-
* index key */
107-
}BloomOptions;
104+
intbitSize[INDEX_MAX_KEYS];/* # of bits generated for
105+
* each index key */
106+
}BloomOptions;
108107

109108
/*
110109
* FreeBlockNumberArray - array of block numbers sized so that metadata fill
@@ -125,7 +124,7 @@ typedef struct BloomMetaPageData
125124
uint16nEnd;
126125
BloomOptionsopts;
127126
FreeBlockNumberArraynotFullPage;
128-
}BloomMetaPageData;
127+
}BloomMetaPageData;
129128

130129
/* Magic number to distinguish bloom pages among anothers */
131130
#defineBLOOM_MAGICK_NUMBER (0xDBAC0DED)
@@ -146,7 +145,7 @@ typedef struct BloomState
146145
* precompute it
147146
*/
148147
SizesizeOfBloomTuple;
149-
}BloomState;
148+
}BloomState;
150149

151150
#defineBloomPageGetFreeSpace(state,page) \
152151
(BLCKSZ - MAXALIGN(SizeOfPageHeaderData) \
@@ -160,30 +159,30 @@ typedef struct BloomTuple
160159
{
161160
ItemPointerDataheapPtr;
162161
BloomSignatureWordsign[FLEXIBLE_ARRAY_MEMBER];
163-
}BloomTuple;
162+
}BloomTuple;
164163

165164
#defineBLOOMTUPLEHDRSZ offsetof(BloomTuple, sign)
166165

167166
/* Opaque data structure for bloom index scan */
168167
typedefstructBloomScanOpaqueData
169168
{
170-
BloomSignatureWord*sign;/* Scan signature */
169+
BloomSignatureWord*sign;/* Scan signature */
171170
BloomStatestate;
172-
}BloomScanOpaqueData;
171+
}BloomScanOpaqueData;
173172

174173
typedefBloomScanOpaqueData*BloomScanOpaque;
175174

176175
/* blutils.c */
177176
externvoid_PG_init(void);
178177
externDatumblhandler(PG_FUNCTION_ARGS);
179-
externvoidinitBloomState(BloomState*state,Relationindex);
178+
externvoidinitBloomState(BloomState*state,Relationindex);
180179
externvoidBloomFillMetapage(Relationindex,PagemetaPage);
181180
externvoidBloomInitMetapage(Relationindex);
182181
externvoidBloomInitPage(Pagepage,uint16flags);
183182
externBufferBloomNewBuffer(Relationindex);
184-
externvoidsignValue(BloomState*state,BloomSignatureWord*sign,Datumvalue,intattno);
185-
externBloomTuple*BloomFormTuple(BloomState*state,ItemPointeriptr,Datum*values,bool*isnull);
186-
externboolBloomPageAddItem(BloomState*state,Pagepage,BloomTuple*tuple);
183+
externvoidsignValue(BloomState*state,BloomSignatureWord*sign,Datumvalue,intattno);
184+
externBloomTuple*BloomFormTuple(BloomState*state,ItemPointeriptr,Datum*values,bool*isnull);
185+
externboolBloomPageAddItem(BloomState*state,Pagepage,BloomTuple*tuple);
187186

188187
/* blvalidate.c */
189188
externboolblvalidate(Oidopclassoid);

‎contrib/bloom/blutils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ PG_FUNCTION_INFO_V1(blhandler);
3737

3838
/* Kind of relation options for bloom index */
3939
staticrelopt_kindbl_relopt_kind;
40+
4041
/* parse table for fillRelOptions */
4142
staticrelopt_parse_eltbl_relopt_tab[INDEX_MAX_KEYS+1];
4243

@@ -215,7 +216,9 @@ myRand(void)
215216
* October 1988, p. 1195.
216217
*----------
217218
*/
218-
int32hi,lo,x;
219+
int32hi,
220+
lo,
221+
x;
219222

220223
/* Must be in [1, 0x7ffffffe] range at this point. */
221224
hi=next /127773;

‎contrib/bloom/blvacuum.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
7878
/* Iterate over the tuples */
7979
itup=itupPtr=BloomPageGetTuple(&state,page,FirstOffsetNumber);
8080
itupEnd=BloomPageGetTuple(&state,page,
81-
OffsetNumberNext(BloomPageGetMaxOffset(page)));
81+
OffsetNumberNext(BloomPageGetMaxOffset(page)));
8282
while (itup<itupEnd)
8383
{
8484
/* Do we have to delete this tuple? */
@@ -106,11 +106,11 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
106106
}
107107

108108
Assert(itupPtr==BloomPageGetTuple(&state,page,
109-
OffsetNumberNext(BloomPageGetMaxOffset(page))));
109+
OffsetNumberNext(BloomPageGetMaxOffset(page))));
110110

111111
/*
112-
* Add page to notFullPage list if we will not mark page as deleted and
113-
* there is a free space on it
112+
* Add page to notFullPage list if we will not mark page as deleted
113+
*andthere is a free space on it
114114
*/
115115
if (BloomPageGetMaxOffset(page)!=0&&
116116
BloomPageGetFreeSpace(&state,page)>state.sizeOfBloomTuple&&

‎contrib/file_fdw/file_fdw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static bool fileAnalyzeForeignTable(Relation relation,
132132
AcquireSampleRowsFunc*func,
133133
BlockNumber*totalpages);
134134
staticboolfileIsForeignScanParallelSafe(PlannerInfo*root,RelOptInfo*rel,
135-
RangeTblEntry*rte);
135+
RangeTblEntry*rte);
136136

137137
/*
138138
* Helper functions
@@ -767,12 +767,12 @@ fileAnalyzeForeignTable(Relation relation,
767767

768768
/*
769769
* fileIsForeignScanParallelSafe
770-
*Reading a file in a parallel worker should work just the same as
771-
*reading it in the leader, so mark scans safe.
770+
*Reading a file in a parallel worker should work just the same as
771+
*reading it in the leader, so mark scans safe.
772772
*/
773773
staticbool
774774
fileIsForeignScanParallelSafe(PlannerInfo*root,RelOptInfo*rel,
775-
RangeTblEntry*rte)
775+
RangeTblEntry*rte)
776776
{
777777
return true;
778778
}

‎contrib/isn/isn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@ ean2ISBN(char *isn)
444444
unsignedcheck;
445445

446446
/*
447-
* The number should come in this format: 978-0-000-00000-0
448-
*or may be anISBN-13 number, 979-..., which does not have a short
449-
*representation. Dothe short output version if possible.
447+
* The number should come in this format: 978-0-000-00000-0 or may be an
448+
* ISBN-13 number, 979-..., which does not have a short representation. Do
449+
* the short output version if possible.
450450
*/
451451
if (strncmp("978-",isn,4)==0)
452452
{

‎contrib/pageinspect/heapfuncs.c

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ text_to_bits(char *str, int len)
8282
else
8383
ereport(ERROR,
8484
(errcode(ERRCODE_DATA_CORRUPTED),
85-
errmsg("illegal character '%c' in t_bits string",str[off])));
85+
errmsg("illegal character '%c' in t_bits string",str[off])));
8686

8787
if (off %8==7)
8888
bits[off /8]=byte;
@@ -192,9 +192,9 @@ heap_page_items(PG_FUNCTION_ARGS)
192192
lp_offset==MAXALIGN(lp_offset)&&
193193
lp_offset+lp_len <=raw_page_size)
194194
{
195-
HeapTupleHeadertuphdr;
196-
bytea*tuple_data_bytea;
197-
inttuple_data_len;
195+
HeapTupleHeadertuphdr;
196+
bytea*tuple_data_bytea;
197+
inttuple_data_len;
198198

199199
/* Extract information from the tuple header */
200200

@@ -214,7 +214,7 @@ heap_page_items(PG_FUNCTION_ARGS)
214214
tuple_data_bytea= (bytea*)palloc(tuple_data_len+VARHDRSZ);
215215
SET_VARSIZE(tuple_data_bytea,tuple_data_len+VARHDRSZ);
216216
memcpy(VARDATA(tuple_data_bytea), (char*)tuphdr+tuphdr->t_hoff,
217-
tuple_data_len);
217+
tuple_data_len);
218218
values[13]=PointerGetDatum(tuple_data_bytea);
219219

220220
/*
@@ -284,16 +284,16 @@ heap_page_items(PG_FUNCTION_ARGS)
284284
*/
285285
staticDatum
286286
tuple_data_split_internal(Oidrelid,char*tupdata,
287-
uint16tupdata_len,uint16t_infomask,
288-
uint16t_infomask2,bits8*t_bits,
289-
booldo_detoast)
287+
uint16tupdata_len,uint16t_infomask,
288+
uint16t_infomask2,bits8*t_bits,
289+
booldo_detoast)
290290
{
291-
ArrayBuildState*raw_attrs;
292-
intnattrs;
293-
inti;
294-
intoff=0;
295-
Relationrel;
296-
TupleDesctupdesc;
291+
ArrayBuildState*raw_attrs;
292+
intnattrs;
293+
inti;
294+
intoff=0;
295+
Relationrel;
296+
TupleDesctupdesc;
297297

298298
/* Get tuple descriptor from relation OID */
299299
rel=relation_open(relid,NoLock);
@@ -310,30 +310,31 @@ tuple_data_split_internal(Oid relid, char *tupdata,
310310

311311
for (i=0;i<nattrs;i++)
312312
{
313-
Form_pg_attributeattr;
314-
boolis_null;
315-
bytea*attr_data=NULL;
313+
Form_pg_attributeattr;
314+
boolis_null;
315+
bytea*attr_data=NULL;
316316

317317
attr=tupdesc->attrs[i];
318318
is_null= (t_infomask&HEAP_HASNULL)&&att_isnull(i,t_bits);
319319

320320
/*
321-
* Tuple header can specify less attributes than tuple descriptor
322-
*asALTER TABLE ADD COLUMN without DEFAULT keyword does not
323-
*actuallychange tuples in pages, so attributes with numbers greater
324-
*than(t_infomask2 & HEAP_NATTS_MASK) should be treated as NULL.
321+
* Tuple header can specify less attributes than tuple descriptor as
322+
* ALTER TABLE ADD COLUMN without DEFAULT keyword does not actually
323+
* change tuples in pages, so attributes with numbers greater than
324+
* (t_infomask2 & HEAP_NATTS_MASK) should be treated as NULL.
325325
*/
326326
if (i >= (t_infomask2&HEAP_NATTS_MASK))
327327
is_null= true;
328328

329329
if (!is_null)
330330
{
331-
intlen;
331+
intlen;
332332

333333
if (attr->attlen==-1)
334334
{
335335
off=att_align_pointer(off,tupdesc->attrs[i]->attalign,-1,
336336
tupdata+off);
337+
337338
/*
338339
* As VARSIZE_ANY throws an exception if it can't properly
339340
* detect the type of external storage in macros VARTAG_SIZE,
@@ -343,8 +344,8 @@ tuple_data_split_internal(Oid relid, char *tupdata,
343344
!VARATT_IS_EXTERNAL_ONDISK(tupdata+off)&&
344345
!VARATT_IS_EXTERNAL_INDIRECT(tupdata+off))
345346
ereport(ERROR,
346-
(errcode(ERRCODE_DATA_CORRUPTED),
347-
errmsg("first byte of varlena attribute is incorrect for attribute %d",i)));
347+
(errcode(ERRCODE_DATA_CORRUPTED),
348+
errmsg("first byte of varlena attribute is incorrect for attribute %d",i)));
348349

349350
len=VARSIZE_ANY(tupdata+off);
350351
}
@@ -381,7 +382,7 @@ tuple_data_split_internal(Oid relid, char *tupdata,
381382
if (tupdata_len!=off)
382383
ereport(ERROR,
383384
(errcode(ERRCODE_DATA_CORRUPTED),
384-
errmsg("end of tuple reached without looking at all its data")));
385+
errmsg("end of tuple reached without looking at all its data")));
385386

386387
returnmakeArrayResult(raw_attrs,CurrentMemoryContext);
387388
}
@@ -397,14 +398,14 @@ PG_FUNCTION_INFO_V1(tuple_data_split);
397398
Datum
398399
tuple_data_split(PG_FUNCTION_ARGS)
399400
{
400-
Oidrelid;
401-
bytea*raw_data;
402-
uint16t_infomask;
403-
uint16t_infomask2;
404-
char*t_bits_str;
405-
booldo_detoast= false;
406-
bits8*t_bits=NULL;
407-
Datumres;
401+
Oidrelid;
402+
bytea*raw_data;
403+
uint16t_infomask;
404+
uint16t_infomask2;
405+
char*t_bits_str;
406+
booldo_detoast= false;
407+
bits8*t_bits=NULL;
408+
Datumres;
408409

409410
relid=PG_GETARG_OID(0);
410411
raw_data=PG_ARGISNULL(1) ?NULL :PG_GETARG_BYTEA_P(1);
@@ -430,8 +431,8 @@ tuple_data_split(PG_FUNCTION_ARGS)
430431
*/
431432
if (t_infomask&HEAP_HASNULL)
432433
{
433-
intbits_str_len;
434-
intbits_len;
434+
intbits_str_len;
435+
intbits_len;
435436

436437
bits_len= (t_infomask2&HEAP_NATTS_MASK) /8+1;
437438
if (!t_bits_str)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp