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

Commitc7b8998

Browse files
committed
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of commentsto the right of code, and remove pgindent hack that caused commentsfollowing #endif to not obey the general rule.Commite3860ff wasn't actually usingthe published version of pg_bsd_indent, but a hacked-up version thattried to minimize the amount of movement of comments to the right ofcode. The situation of interest is where such a comment has to bemoved to the right of its default placement at column 33 because there'scode there. BSD indent has always moved right in units of tab stopsin such cases --- but in the previous incarnation, indent was workingin 8-space tab stops, while now it knows we use 4-space tabs. So thenet result is that in about half the cases, such comments are placedone tab stop left of before. This is better all around: it leavesmore room on the line for comment text, and it means that in suchcases the comment uniformly starts at the next 4-space tab stop afterthe code, rather than sometimes one and sometimes two tabs after.Also, ensure that comments following #endif are indented the sameas comments following other preprocessor commands such as #else.That inconsistency turns out to have been self-inflicted damagefrom a poorly-thought-through post-indent "fixup" in pgindent.This patch is much less interesting than the first round of indentchanges, but also bulkier, so I thought it best to separate the effects.Discussion:https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.orgDiscussion:https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
1 parentf669c09 commitc7b8998

File tree

1,107 files changed

+3435
-3516
lines changed

Some content is hidden

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

1,107 files changed

+3435
-3516
lines changed

‎contrib/bloom/bloom.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typedef BloomPageOpaqueData *BloomPageOpaque;
7575

7676
/* Preserved page numbers */
7777
#defineBLOOM_METAPAGE_BLKNO(0)
78-
#defineBLOOM_HEAD_BLKNO(1)/* first data page */
78+
#defineBLOOM_HEAD_BLKNO(1)/* first data page */
7979

8080
/*
8181
* We store Bloom signatures as arrays of uint16 words.
@@ -101,8 +101,8 @@ typedef struct BloomOptions
101101
{
102102
int32vl_len_;/* varlena header (do not touch directly!) */
103103
intbloomLength;/* length of signature in words (not bits!) */
104-
intbitSize[INDEX_MAX_KEYS];/* # of bits generated for
105-
* each index key */
104+
intbitSize[INDEX_MAX_KEYS];/* # of bits generated for each
105+
* index key */
106106
}BloomOptions;
107107

108108
/*

‎contrib/btree_gist/btree_utils_num.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ typedef struct
4242

4343
/* Methods */
4444

45-
bool(*f_gt) (constvoid*,constvoid*,FmgrInfo*);/* greater than */
46-
bool(*f_ge) (constvoid*,constvoid*,FmgrInfo*);/* greater or equal */
47-
bool(*f_eq) (constvoid*,constvoid*,FmgrInfo*);/* equal */
48-
bool(*f_le) (constvoid*,constvoid*,FmgrInfo*);/* less or equal */
49-
bool(*f_lt) (constvoid*,constvoid*,FmgrInfo*);/* less than */
50-
int(*f_cmp) (constvoid*,constvoid*,FmgrInfo*);/* key compare function */
51-
float8(*f_dist) (constvoid*,constvoid*,FmgrInfo*);/* key distance function */
45+
bool(*f_gt) (constvoid*,constvoid*,FmgrInfo*);/* greater than */
46+
bool(*f_ge) (constvoid*,constvoid*,FmgrInfo*);/* greater or equal */
47+
bool(*f_eq) (constvoid*,constvoid*,FmgrInfo*);/* equal */
48+
bool(*f_le) (constvoid*,constvoid*,FmgrInfo*);/* less or equal */
49+
bool(*f_lt) (constvoid*,constvoid*,FmgrInfo*);/* less than */
50+
int(*f_cmp) (constvoid*,constvoid*,FmgrInfo*);/* key compare function */
51+
float8(*f_dist) (constvoid*,constvoid*,FmgrInfo*);/* key distance function */
5252
}gbtree_ninfo;
5353

5454

‎contrib/btree_gist/btree_utils_var.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
488488

489489
cur= (char*)DatumGetPointer(entryvec->vector[i].key);
490490
ro=gbt_var_key_readable((GBT_VARKEY*)cur);
491-
if (ro.lower==ro.upper)/* leaf */
491+
if (ro.lower==ro.upper)/* leaf */
492492
{
493493
sv[svcntr]=gbt_var_leaf2node((GBT_VARKEY*)cur,tinfo,flinfo);
494494
arr[i].t=sv[svcntr];

‎contrib/btree_gist/btree_utils_var.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef struct
4040
bool(*f_le) (constvoid*,constvoid*,Oid,FmgrInfo*);/* less equal */
4141
bool(*f_lt) (constvoid*,constvoid*,Oid,FmgrInfo*);/* less than */
4242
int32(*f_cmp) (constvoid*,constvoid*,Oid,FmgrInfo*);/* compare */
43-
GBT_VARKEY*(*f_l2n) (GBT_VARKEY*,FmgrInfo*flinfo);/* convert leaf to node */
43+
GBT_VARKEY*(*f_l2n) (GBT_VARKEY*,FmgrInfo*flinfo);/* convert leaf to node */
4444
}gbtree_vinfo;
4545

4646

‎contrib/btree_gist/btree_uuid.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static double
171171
uuid_2_double(constpg_uuid_t*u)
172172
{
173173
uint64uu[2];
174-
constdoubletwo64=18446744073709551616.0;/* 2^64 */
174+
constdoubletwo64=18446744073709551616.0;/* 2^64 */
175175

176176
/* Source data may not be suitably aligned, so copy */
177177
memcpy(uu,u->data,UUID_LEN);

‎contrib/cube/cubedata.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ typedef struct NDBOX
5454
#definePG_RETURN_NDBOX(x)PG_RETURN_POINTER(x)
5555

5656
/* GiST operator strategy numbers */
57-
#defineCubeKNNDistanceCoord15/* ~> */
58-
#defineCubeKNNDistanceTaxicab16/* <#> */
59-
#defineCubeKNNDistanceEuclid17/* <-> */
60-
#defineCubeKNNDistanceChebyshev18/* <=> */
57+
#defineCubeKNNDistanceCoord15/* ~> */
58+
#defineCubeKNNDistanceTaxicab16/* <#> */
59+
#defineCubeKNNDistanceEuclid17/* <-> */
60+
#defineCubeKNNDistanceChebyshev18/* <=> */
6161

6262
/* in cubescan.l */
6363
externintcube_yylex(void);

‎contrib/dblink/dblink.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef struct remoteConn
6767
{
6868
PGconn*conn;/* Hold the remote connection */
6969
intopenCursorCount;/* The number of open cursors */
70-
boolnewXactForCursor;/* Opened a transaction for a cursor */
70+
boolnewXactForCursor;/* Opened a transaction for a cursor */
7171
}remoteConn;
7272

7373
typedefstructstoreInfo
@@ -1098,7 +1098,7 @@ storeQueryResult(volatile storeInfo *sinfo, PGconn *conn, const char *sql)
10981098
if (!PQsendQuery(conn,sql))
10991099
elog(ERROR,"could not send query: %s",pchomp(PQerrorMessage(conn)));
11001100

1101-
if (!PQsetSingleRowMode(conn))/* shouldn't fail */
1101+
if (!PQsetSingleRowMode(conn))/* shouldn't fail */
11021102
elog(ERROR,"failed to set single-row mode for dblink query");
11031103

11041104
for (;;)

‎contrib/file_fdw/file_fdw.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,13 +544,13 @@ fileGetForeignPaths(PlannerInfo *root,
544544
*/
545545
add_path(baserel, (Path*)
546546
create_foreignscan_path(root,baserel,
547-
NULL,/* default pathtarget */
547+
NULL,/* default pathtarget */
548548
baserel->rows,
549549
startup_cost,
550550
total_cost,
551-
NIL,/* no pathkeys */
552-
NULL,/* no outer rel either */
553-
NULL,/* no extra plan */
551+
NIL,/* no pathkeys */
552+
NULL,/* no outer rel either */
553+
NULL,/* no extra plan */
554554
coptions));
555555

556556
/*

‎contrib/fuzzystrmatch/dmetaphone.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
111111
#include<string.h>
112112
#include<stdarg.h>
113113

114-
#endif/* DMETAPHONE_MAIN */
114+
#endif/* DMETAPHONE_MAIN */
115115

116116
#include<assert.h>
117117
#include<ctype.h>
@@ -197,7 +197,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
197197
* in a case like this.
198198
*/
199199

200-
#defineMETA_FREE(x) ((void)true)/* pfree((x)) */
200+
#defineMETA_FREE(x) ((void)true)/* pfree((x)) */
201201
#else/* not defined DMETAPHONE_MAIN */
202202

203203
/* use the standard malloc library when not running in PostgreSQL */
@@ -209,7 +209,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
209209
(v = (t*)realloc((v),((n)*sizeof(t))))
210210

211211
#defineMETA_FREE(x) free((x))
212-
#endif/* defined DMETAPHONE_MAIN */
212+
#endif/* defined DMETAPHONE_MAIN */
213213

214214

215215

@@ -977,7 +977,7 @@ DoubleMetaphone(char *str, char **codes)
977977
}
978978
}
979979

980-
if (GetAt(original,current+1)=='J')/* it could happen! */
980+
if (GetAt(original,current+1)=='J')/* it could happen! */
981981
current+=2;
982982
else
983983
current+=1;

‎contrib/hstore/hstore.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
181181
#defineHStoreExistsStrategyNumber9
182182
#defineHStoreExistsAnyStrategyNumber10
183183
#defineHStoreExistsAllStrategyNumber11
184-
#defineHStoreOldContainsStrategyNumber 13/* backwards compatibility */
184+
#defineHStoreOldContainsStrategyNumber 13/* backwards compatibility */
185185

186186
/*
187187
* defining HSTORE_POLLUTE_NAMESPACE=0 will prevent use of old function names;
@@ -202,4 +202,4 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
202202
extern int no_such_variable
203203
#endif
204204

205-
#endif/* __HSTORE_H__ */
205+
#endif/* __HSTORE_H__ */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp