diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 14:39:04 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 14:39:04 -0400 |
commit | e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 (patch) | |
tree | 8dc7df95c340803546152724fbc17aee4b8527f9 /src/include/access/amapi.h | |
parent | 8ff6d4ec7840b0af56f1207073f44b7f2afae96d (diff) | |
download | postgresql-e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89.tar.gz postgresql-e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89.zip |
Initial pgindent run with pg_bsd_indent version 2.0.
The new indent version includes numerous fixes thanks to Piotr Stefaniak.
The main changes visible in this commit are:
* Nicer formatting of function-pointer declarations.
* No longer unexpectedly removes spaces in expressions using casts,
sizeof, or offsetof.
* No longer wants to add a space in "struct structname *varname", as
well as some similar cases for const- or volatile-qualified pointers.
* Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely.
* Fixes bug where comments following declarations were sometimes placed
with no space separating them from the code.
* Fixes some odd decisions for comments following case labels.
* Fixes some cases where comments following code were indented to less
than the expected column 33.
On the less good side, it now tends to put more whitespace around typedef
names that are not listed in typedefs.list. This might encourage us to
put more effort into typedef name collection; it's not really a bug in
indent itself.
There are more changes coming after this round, having to do with comment
indentation and alignment of lines appearing within parentheses. I wanted
to limit the size of the diffs to something that could be reviewed without
one's eyes completely glazing over, so it seemed better to split up the
changes as much as practical.
Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/include/access/amapi.h')
-rw-r--r-- | src/include/access/amapi.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h index f919cf8b873..37bd51f85bc 100644 --- a/src/include/access/amapi.h +++ b/src/include/access/amapi.h @@ -60,20 +60,20 @@ typedef enum IndexAMProperty /* build new index */ typedef IndexBuildResult *(*ambuild_function) (Relation heapRelation, - Relation indexRelation, - struct IndexInfo *indexInfo); + Relation indexRelation, + struct IndexInfo *indexInfo); /* build empty index */ typedef void (*ambuildempty_function) (Relation indexRelation); /* insert this tuple */ typedef bool (*aminsert_function) (Relation indexRelation, - Datum *values, - bool *isnull, - ItemPointer heap_tid, - Relation heapRelation, - IndexUniqueCheck checkUnique, - struct IndexInfo *indexInfo); + Datum *values, + bool *isnull, + ItemPointer heap_tid, + Relation heapRelation, + IndexUniqueCheck checkUnique, + struct IndexInfo *indexInfo); /* bulk delete */ typedef IndexBulkDeleteResult *(*ambulkdelete_function) (IndexVacuumInfo *info, @@ -90,45 +90,45 @@ typedef bool (*amcanreturn_function) (Relation indexRelation, int attno); /* estimate cost of an indexscan */ typedef void (*amcostestimate_function) (struct PlannerInfo *root, - struct IndexPath *path, - double loop_count, - Cost *indexStartupCost, - Cost *indexTotalCost, - Selectivity *indexSelectivity, - double *indexCorrelation, - double *indexPages); + struct IndexPath *path, + double loop_count, + Cost *indexStartupCost, + Cost *indexTotalCost, + Selectivity *indexSelectivity, + double *indexCorrelation, + double *indexPages); /* parse index reloptions */ typedef bytea *(*amoptions_function) (Datum reloptions, - bool validate); + bool validate); /* report AM, index, or index column property */ typedef bool (*amproperty_function) (Oid index_oid, int attno, IndexAMProperty prop, const char *propname, - bool *res, bool *isnull); + bool *res, bool *isnull); /* validate definition of an opclass for this AM */ typedef bool (*amvalidate_function) (Oid opclassoid); /* prepare for index scan */ typedef IndexScanDesc (*ambeginscan_function) (Relation indexRelation, - int nkeys, - int norderbys); + int nkeys, + int norderbys); /* (re)start index scan */ typedef void (*amrescan_function) (IndexScanDesc scan, - ScanKey keys, - int nkeys, - ScanKey orderbys, - int norderbys); + ScanKey keys, + int nkeys, + ScanKey orderbys, + int norderbys); /* next valid tuple */ typedef bool (*amgettuple_function) (IndexScanDesc scan, - ScanDirection direction); + ScanDirection direction); /* fetch all valid tuples */ typedef int64 (*amgetbitmap_function) (IndexScanDesc scan, - TIDBitmap *tbm); + TIDBitmap *tbm); /* end index scan */ typedef void (*amendscan_function) (IndexScanDesc scan); |