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 | |
| parent | 8ff6d4ec7840b0af56f1207073f44b7f2afae96d (diff) | |
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')
111 files changed, 482 insertions, 470 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); diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 986fe6e0418..45616f9c4d6 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -309,7 +309,7 @@ typedef struct GinScanKeyData bool curItemMatches; bool recheckCurItem; bool isFinished; -} GinScanKeyData; +} GinScanKeyData; typedef struct GinScanEntryData { @@ -342,7 +342,7 @@ typedef struct GinScanEntryData bool reduceResult; uint32 predictNumberResult; GinBtreeData btree; -} GinScanEntryData; +} GinScanEntryData; typedef struct GinScanOpaqueData { diff --git a/src/include/access/ginxlog.h b/src/include/access/ginxlog.h index 8decc42cdbe..641ae252fa3 100644 --- a/src/include/access/ginxlog.h +++ b/src/include/access/ginxlog.h @@ -87,7 +87,7 @@ typedef struct * added, followed by the items themselves as ItemPointers. DELETE actions * have no further data. */ -} ginxlogSegmentAction; +} ginxlogSegmentAction; /* Action types */ #define GIN_SEGMENT_UNMODIFIED 0 /* no action (not used in WAL records) */ diff --git a/src/include/access/hash.h b/src/include/access/hash.h index 3a210a876b0..9e8c44bfd3f 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -213,8 +213,8 @@ typedef struct HashMetaPageData uint32 hashm_maxbucket; /* ID of maximum bucket in use */ uint32 hashm_highmask; /* mask to modulo into entire table */ uint32 hashm_lowmask; /* mask to modulo into lower half of table */ - uint32 hashm_ovflpoint;/* splitpoint from which ovflpgs being - * allocated */ + uint32 hashm_ovflpoint; /* splitpoint from which ovflpgs being + * allocated */ uint32 hashm_firstfree; /* lowest-number free ovflpage (bit#) */ uint32 hashm_nmaps; /* number of bitmap pages */ RegProcedure hashm_procid; /* hash procedure id from pg_proc */ diff --git a/src/include/access/hash_xlog.h b/src/include/access/hash_xlog.h index d4a6a71ca7a..b78672f4dcc 100644 --- a/src/include/access/hash_xlog.h +++ b/src/include/access/hash_xlog.h @@ -63,7 +63,7 @@ typedef struct xl_hash_createidx double num_tuples; RegProcedure procid; uint16 ffactor; -} xl_hash_createidx; +} xl_hash_createidx; #define SizeOfHashCreateIdx (offsetof(xl_hash_createidx, ffactor) + sizeof(uint16)) /* diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 2824f232188..6dfa8d58912 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -32,7 +32,7 @@ typedef struct BulkInsertStateData { BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ Buffer current_buf; /* current insertion target page */ -} BulkInsertStateData; +} BulkInsertStateData; extern void RelationPutHeapTuple(Relation relation, Buffer buffer, diff --git a/src/include/access/itup.h b/src/include/access/itup.h index e9ec8e27e28..ecd7c5c2087 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -55,9 +55,9 @@ typedef IndexTupleData *IndexTuple; typedef struct IndexAttributeBitMapData { bits8 bits[(INDEX_MAX_KEYS + 8 - 1) / 8]; -} IndexAttributeBitMapData; +} IndexAttributeBitMapData; -typedef IndexAttributeBitMapData *IndexAttributeBitMap; +typedef IndexAttributeBitMapData * IndexAttributeBitMap; /* * t_info manipulation macros diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index f4d4f1ee719..5247692d354 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -39,7 +39,7 @@ typedef struct ParallelHeapScanDescData BlockNumber phs_startblock; /* starting block number */ BlockNumber phs_cblock; /* current block number */ char phs_snapshot_data[FLEXIBLE_ARRAY_MEMBER]; -} ParallelHeapScanDescData; +} ParallelHeapScanDescData; typedef struct HeapScanDescData { @@ -75,7 +75,7 @@ typedef struct HeapScanDescData int rs_cindex; /* current tuple's index in vistuples */ int rs_ntuples; /* number of visible tuples on page */ OffsetNumber rs_vistuples[MaxHeapTuplesPerPage]; /* their offsets */ -} HeapScanDescData; +} HeapScanDescData; /* * We use the same IndexScanDescData structure for both amgettuple-based @@ -137,7 +137,7 @@ typedef struct IndexScanDescData /* parallel index scan information, in shared memory */ ParallelIndexScanDesc parallel_scan; -} IndexScanDescData; +} IndexScanDescData; /* Generic structure for parallel scans */ typedef struct ParallelIndexScanDescData @@ -146,7 +146,7 @@ typedef struct ParallelIndexScanDescData Oid ps_indexid; Size ps_offset; /* Offset in bytes of am specific structure */ char ps_snapshot_data[FLEXIBLE_ARRAY_MEMBER]; -} ParallelIndexScanDescData; +} ParallelIndexScanDescData; /* Struct for heap-or-index scans of system tables */ typedef struct SysScanDescData @@ -156,6 +156,6 @@ typedef struct SysScanDescData HeapScanDesc scan; /* only valid in heap-scan case */ IndexScanDesc iscan; /* only valid in index-scan case */ Snapshot snapshot; /* snapshot to unregister at end of scan */ -} SysScanDescData; +} SysScanDescData; #endif /* RELSCAN_H */ diff --git a/src/include/access/slru.h b/src/include/access/slru.h index 722867d5d2b..42d0bb72edb 100644 --- a/src/include/access/slru.h +++ b/src/include/access/slru.h @@ -155,7 +155,7 @@ extern void SimpleLruTruncate(SlruCtl ctl, int cutoffPage); extern bool SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno); typedef bool (*SlruScanCallback) (SlruCtl ctl, char *filename, int segpage, - void *data); + void *data); extern bool SlruScanDirectory(SlruCtl ctl, SlruScanCallback callback, void *data); extern void SlruDeleteSegment(SlruCtl ctl, int segno); diff --git a/src/include/access/tsmapi.h b/src/include/access/tsmapi.h index d07b3f25a92..8ba750299f0 100644 --- a/src/include/access/tsmapi.h +++ b/src/include/access/tsmapi.h @@ -21,24 +21,24 @@ */ typedef void (*SampleScanGetSampleSize_function) (PlannerInfo *root, - RelOptInfo *baserel, - List *paramexprs, - BlockNumber *pages, - double *tuples); + RelOptInfo *baserel, + List *paramexprs, + BlockNumber *pages, + double *tuples); typedef void (*InitSampleScan_function) (SampleScanState *node, - int eflags); + int eflags); typedef void (*BeginSampleScan_function) (SampleScanState *node, - Datum *params, - int nparams, - uint32 seed); + Datum *params, + int nparams, + uint32 seed); typedef BlockNumber (*NextSampleBlock_function) (SampleScanState *node); typedef OffsetNumber (*NextSampleTuple_function) (SampleScanState *node, - BlockNumber blockno, - OffsetNumber maxoffset); + BlockNumber blockno, + OffsetNumber maxoffset); typedef void (*EndSampleScan_function) (SampleScanState *node); diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index b48f839028b..0d1e263013a 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -78,7 +78,7 @@ typedef struct tupleDesc int32 tdtypmod; /* typmod for tuple type */ bool tdhasoid; /* tuple has oid attribute in its header */ int tdrefcount; /* reference count, or -1 if not counting */ -} *TupleDesc; +} *TupleDesc; extern TupleDesc CreateTemplateTupleDesc(int natts, bool hasoid); diff --git a/src/include/access/tuptoaster.h b/src/include/access/tuptoaster.h index c7abeed8126..6a5880e2387 100644 --- a/src/include/access/tuptoaster.h +++ b/src/include/access/tuptoaster.h @@ -152,7 +152,7 @@ extern void toast_delete(Relation rel, HeapTuple oldtup, bool is_speculative); * in compressed format. * ---------- */ -extern struct varlena *heap_tuple_fetch_attr(struct varlena * attr); +extern struct varlena *heap_tuple_fetch_attr(struct varlena *attr); /* ---------- * heap_tuple_untoast_attr() - @@ -161,7 +161,7 @@ extern struct varlena *heap_tuple_fetch_attr(struct varlena * attr); * it as needed. * ---------- */ -extern struct varlena *heap_tuple_untoast_attr(struct varlena * attr); +extern struct varlena *heap_tuple_untoast_attr(struct varlena *attr); /* ---------- * heap_tuple_untoast_attr_slice() - @@ -170,7 +170,7 @@ extern struct varlena *heap_tuple_untoast_attr(struct varlena * attr); * (Handles all cases for attribute storage) * ---------- */ -extern struct varlena *heap_tuple_untoast_attr_slice(struct varlena * attr, +extern struct varlena *heap_tuple_untoast_attr_slice(struct varlena *attr, int32 sliceoffset, int32 slicelength); diff --git a/src/include/access/twophase_rmgr.h b/src/include/access/twophase_rmgr.h index 32b6475dd98..ed2067b7fb3 100644 --- a/src/include/access/twophase_rmgr.h +++ b/src/include/access/twophase_rmgr.h @@ -15,7 +15,7 @@ #define TWOPHASE_RMGR_H typedef void (*TwoPhaseCallback) (TransactionId xid, uint16 info, - void *recdata, uint32 len); + void *recdata, uint32 len); typedef uint8 TwoPhaseRmgrId; /* diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 7eb85b72df2..50bace80de2 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -63,7 +63,7 @@ typedef enum SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */ SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote * apply */ -} SyncCommitLevel; +} SyncCommitLevel; /* Define the default setting for synchronous_commit */ #define SYNCHRONOUS_COMMIT_ON SYNCHRONOUS_COMMIT_REMOTE_FLUSH @@ -119,7 +119,7 @@ typedef enum } SubXactEvent; typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid, - SubTransactionId parentSubid, void *arg); + SubTransactionId parentSubid, void *arg); /* ---------------- diff --git a/src/include/access/xloginsert.h b/src/include/access/xloginsert.h index d30786fa0d1..d0d005a557d 100644 --- a/src/include/access/xloginsert.h +++ b/src/include/access/xloginsert.h @@ -32,11 +32,11 @@ #define REGBUF_WILL_INIT (0x04 | 0x02) /* page will be re-initialized * at replay (implies * NO_IMAGE) */ -#define REGBUF_STANDARD 0x08/* page follows "standard" page layout, (data - * between pd_lower and pd_upper will be - * skipped) */ -#define REGBUF_KEEP_DATA 0x10/* include data even if a full-page image is - * taken */ +#define REGBUF_STANDARD 0x08 /* page follows "standard" page layout, + * (data between pd_lower and pd_upper + * will be skipped) */ +#define REGBUF_KEEP_DATA 0x10 /* include data even if a full-page image + * is taken */ /* prototypes for public functions in xloginsert.c: */ extern void XLogBeginInsert(void); diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h index 956c9bd3a86..51843a28076 100644 --- a/src/include/access/xlogreader.h +++ b/src/include/access/xlogreader.h @@ -31,11 +31,11 @@ typedef struct XLogReaderState XLogReaderState; /* Function type definition for the read_page callback */ typedef int (*XLogPageReadCB) (XLogReaderState *xlogreader, - XLogRecPtr targetPagePtr, - int reqLen, - XLogRecPtr targetRecPtr, - char *readBuf, - TimeLineID *pageTLI); + XLogRecPtr targetPagePtr, + int reqLen, + XLogRecPtr targetRecPtr, + char *readBuf, + TimeLineID *pageTLI); typedef struct { diff --git a/src/include/access/xlogrecord.h b/src/include/access/xlogrecord.h index eeb6a30c1c3..1a8dcf2cce4 100644 --- a/src/include/access/xlogrecord.h +++ b/src/include/access/xlogrecord.h @@ -146,7 +146,8 @@ typedef struct XLogRecordBlockImageHeader /* Information stored in bimg_info */ #define BKPIMAGE_HAS_HOLE 0x01 /* page image has "hole" */ #define BKPIMAGE_IS_COMPRESSED 0x02 /* page image is compressed */ -#define BKPIMAGE_APPLY 0x04 /* page image should be restored during replay */ +#define BKPIMAGE_APPLY 0x04 /* page image should be restored during + * replay */ /* * Extra header information used when page image has "hole" and @@ -195,7 +196,7 @@ typedef struct XLogRecordDataHeaderShort { uint8 id; /* XLR_BLOCK_ID_DATA_SHORT */ uint8 data_length; /* number of payload bytes */ -} XLogRecordDataHeaderShort; +} XLogRecordDataHeaderShort; #define SizeOfXLogRecordDataHeaderShort (sizeof(uint8) * 2) @@ -203,7 +204,7 @@ typedef struct XLogRecordDataHeaderLong { uint8 id; /* XLR_BLOCK_ID_DATA_LONG */ /* followed by uint32 data_length, unaligned */ -} XLogRecordDataHeaderLong; +} XLogRecordDataHeaderLong; #define SizeOfXLogRecordDataHeaderLong (sizeof(uint8) + sizeof(uint32)) diff --git a/src/include/c.h b/src/include/c.h index 10953b31723..c8e761d2777 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -420,7 +420,7 @@ typedef uint32 CommandId; typedef struct { int indx[MAXDIM]; -} IntArray; +} IntArray; /* ---------------- * Variable-length datatypes all share the 'struct varlena' header. diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index 20bec90b9d6..47c059cae49 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -22,11 +22,11 @@ /* Typedef for callback function for IndexBuildHeapScan */ typedef void (*IndexBuildCallback) (Relation index, - HeapTuple htup, - Datum *values, - bool *isnull, - bool tupleIsAlive, - void *state); + HeapTuple htup, + Datum *values, + bool *isnull, + bool tupleIsAlive, + void *state); /* Action code for index_set_state_flags */ typedef enum diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h index 5294a529849..9bec5d5685a 100644 --- a/src/include/catalog/namespace.h +++ b/src/include/catalog/namespace.h @@ -35,7 +35,7 @@ typedef struct _FuncCandidateList int ndargs; /* number of defaulted args */ int *argnumbers; /* args' positional indexes, if named call */ Oid args[FLEXIBLE_ARRAY_MEMBER]; /* arg types */ -} *FuncCandidateList; +} *FuncCandidateList; /* * Structure for xxxOverrideSearchPath functions @@ -48,7 +48,7 @@ typedef struct OverrideSearchPath } OverrideSearchPath; typedef void (*RangeVarGetRelidCallback) (const RangeVar *relation, Oid relId, - Oid oldRelId, void *callback_arg); + Oid oldRelId, void *callback_arg); #define RangeVarGetRelid(relation, lockmode, missing_ok) \ RangeVarGetRelidExtended(relation, lockmode, missing_ok, false, NULL, NULL) diff --git a/src/include/catalog/objectaccess.h b/src/include/catalog/objectaccess.h index 3a6dd596cea..a53528bba01 100644 --- a/src/include/catalog/objectaccess.h +++ b/src/include/catalog/objectaccess.h @@ -118,10 +118,10 @@ typedef struct /* Plugin provides a hook function matching this signature. */ typedef void (*object_access_hook_type) (ObjectAccessType access, - Oid classId, - Oid objectId, - int subId, - void *arg); + Oid classId, + Oid objectId, + int subId, + void *arg); /* Plugin sets this variable to a suitable hook function. */ extern PGDLLIMPORT object_access_hook_type object_access_hook; diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h index 311258fd7b3..f09b5d7832a 100644 --- a/src/include/catalog/pg_db_role_setting.h +++ b/src/include/catalog/pg_db_role_setting.h @@ -42,7 +42,7 @@ CATALOG(pg_db_role_setting,2964) BKI_SHARED_RELATION BKI_WITHOUT_OIDS #endif } FormData_pg_db_role_setting; -typedef FormData_pg_db_role_setting *Form_pg_db_role_setting; +typedef FormData_pg_db_role_setting * Form_pg_db_role_setting; /* ---------------- * compiler constants for pg_db_role_setting diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h index 2f51ac33f35..9e834fca1ad 100644 --- a/src/include/catalog/pg_description.h +++ b/src/include/catalog/pg_description.h @@ -52,7 +52,7 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS int32 objsubid; /* column number, or 0 if not used */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - text description BKI_FORCE_NOT_NULL; /* description of object */ + text description BKI_FORCE_NOT_NULL; /* description of object */ #endif } FormData_pg_description; @@ -61,7 +61,7 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS * the format of pg_description relation. * ---------------- */ -typedef FormData_pg_description *Form_pg_description; +typedef FormData_pg_description * Form_pg_description; /* ---------------- * compiler constants for pg_description diff --git a/src/include/catalog/pg_extension.h b/src/include/catalog/pg_extension.h index 41b087d8b95..56d117a78af 100644 --- a/src/include/catalog/pg_extension.h +++ b/src/include/catalog/pg_extension.h @@ -37,7 +37,7 @@ CATALOG(pg_extension,3079) #ifdef CATALOG_VARLEN /* variable-length fields start here */ /* extversion may never be null, but the others can be. */ - text extversion BKI_FORCE_NOT_NULL; /* extension version name */ + text extversion BKI_FORCE_NOT_NULL; /* extension version name */ Oid extconfig[1]; /* dumpable configuration tables */ text extcondition[1]; /* WHERE clauses for config tables */ #endif diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h index 0d241b8a40b..b60c3f961c0 100644 --- a/src/include/catalog/pg_init_privs.h +++ b/src/include/catalog/pg_init_privs.h @@ -59,7 +59,7 @@ CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS * the format of pg_init_privs relation. * ---------------- */ -typedef FormData_pg_init_privs *Form_pg_init_privs; +typedef FormData_pg_init_privs * Form_pg_init_privs; /* ---------------- * compiler constants for pg_init_privs diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h index 93c8c6af6e4..2bdcf96be31 100644 --- a/src/include/catalog/pg_largeobject.h +++ b/src/include/catalog/pg_largeobject.h @@ -34,7 +34,8 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS int32 pageno; /* Page number (starting from 0) */ /* data has variable length, but we allow direct access; see inv_api.c */ - bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be zero-length) */ + bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be + * zero-length) */ } FormData_pg_largeobject; /* ---------------- diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h index 6d770fbb3cc..236291f28e9 100644 --- a/src/include/catalog/pg_pltemplate.h +++ b/src/include/catalog/pg_pltemplate.h @@ -35,11 +35,11 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS bool tmpldbacreate; /* PL is installable by db owner? */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - text tmplhandler BKI_FORCE_NOT_NULL; /* name of call handler + text tmplhandler BKI_FORCE_NOT_NULL; /* name of call handler * function */ text tmplinline; /* name of anonymous-block handler, or NULL */ text tmplvalidator; /* name of validator function, or NULL */ - text tmpllibrary BKI_FORCE_NOT_NULL; /* path of shared library */ + text tmpllibrary BKI_FORCE_NOT_NULL; /* path of shared library */ aclitem tmplacl[1]; /* access privileges for template */ #endif } FormData_pg_pltemplate; diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 9c12ea55256..9eb7b377af9 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -65,10 +65,10 @@ CATALOG(pg_proc,1255) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81) BKI_SCHEMA_MACRO Oid proallargtypes[1]; /* all param types (NULL if IN only) */ char proargmodes[1]; /* parameter modes (NULL if IN only) */ text proargnames[1]; /* parameter names (NULL if no names) */ - pg_node_tree proargdefaults;/* list of expression trees for argument - * defaults (NULL if none) */ + pg_node_tree proargdefaults; /* list of expression trees for argument + * defaults (NULL if none) */ Oid protrftypes[1]; /* types for which to apply transforms */ - text prosrc BKI_FORCE_NOT_NULL; /* procedure source text */ + text prosrc BKI_FORCE_NOT_NULL; /* procedure source text */ text probin; /* secondary procedure info (can be NULL) */ text proconfig[1]; /* procedure-local GUC settings */ aclitem proacl[1]; /* access permissions */ diff --git a/src/include/catalog/pg_replication_origin.h b/src/include/catalog/pg_replication_origin.h index c22831f5176..f95725873b7 100644 --- a/src/include/catalog/pg_replication_origin.h +++ b/src/include/catalog/pg_replication_origin.h @@ -46,7 +46,7 @@ CATALOG(pg_replication_origin,6000) BKI_SHARED_RELATION BKI_WITHOUT_OIDS */ /* external, free-format, name */ - text roname BKI_FORCE_NOT_NULL; + text roname BKI_FORCE_NOT_NULL; #ifdef CATALOG_VARLEN /* further variable-length fields */ #endif diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h index 01e14e77c0e..60eec1d5c83 100644 --- a/src/include/catalog/pg_seclabel.h +++ b/src/include/catalog/pg_seclabel.h @@ -27,8 +27,9 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS int32 objsubid; /* column number, or 0 if not used */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - text provider BKI_FORCE_NOT_NULL; /* name of label provider */ - text label BKI_FORCE_NOT_NULL; /* security label of the object */ + text provider BKI_FORCE_NOT_NULL; /* name of label provider */ + text label BKI_FORCE_NOT_NULL; /* security label of the + * object */ #endif } FormData_pg_seclabel; diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h index 21086447fa0..728b0d2b07f 100644 --- a/src/include/catalog/pg_shdescription.h +++ b/src/include/catalog/pg_shdescription.h @@ -44,7 +44,7 @@ CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS Oid classoid; /* OID of table containing object */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - text description BKI_FORCE_NOT_NULL; /* description of object */ + text description BKI_FORCE_NOT_NULL; /* description of object */ #endif } FormData_pg_shdescription; @@ -53,7 +53,7 @@ CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS * the format of pg_shdescription relation. * ---------------- */ -typedef FormData_pg_shdescription *Form_pg_shdescription; +typedef FormData_pg_shdescription * Form_pg_shdescription; /* ---------------- * compiler constants for pg_shdescription diff --git a/src/include/catalog/pg_shseclabel.h b/src/include/catalog/pg_shseclabel.h index a88f65c1695..e559b409352 100644 --- a/src/include/catalog/pg_shseclabel.h +++ b/src/include/catalog/pg_shseclabel.h @@ -27,12 +27,13 @@ CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOU Oid classoid; /* OID of table containing the shared object */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - text provider BKI_FORCE_NOT_NULL; /* name of label provider */ - text label BKI_FORCE_NOT_NULL; /* security label of the object */ + text provider BKI_FORCE_NOT_NULL; /* name of label provider */ + text label BKI_FORCE_NOT_NULL; /* security label of the + * object */ #endif } FormData_pg_shseclabel; -typedef FormData_pg_shseclabel *Form_pg_shseclabel; +typedef FormData_pg_shseclabel * Form_pg_shseclabel; /* ---------------- * compiler constants for pg_shseclabel diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h index b2cebd4a4b7..75963431a4f 100644 --- a/src/include/catalog/pg_subscription.h +++ b/src/include/catalog/pg_subscription.h @@ -42,13 +42,13 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE #ifdef CATALOG_VARLEN /* variable-length fields start here */ /* Connection string to the publisher */ - text subconninfo BKI_FORCE_NOT_NULL; + text subconninfo BKI_FORCE_NOT_NULL; /* Slot name on publisher */ NameData subslotname; /* Synchronous commit setting for worker */ - text subsynccommit BKI_FORCE_NOT_NULL; + text subsynccommit BKI_FORCE_NOT_NULL; /* List of publications subscribed to */ text subpublications[1] BKI_FORCE_NOT_NULL; diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h index 547332fe654..356bc48bf6a 100644 --- a/src/include/catalog/pg_trigger.h +++ b/src/include/catalog/pg_trigger.h @@ -57,7 +57,7 @@ CATALOG(pg_trigger,2620) int2vector tgattr; /* column numbers, if trigger is on columns */ #ifdef CATALOG_VARLEN - bytea tgargs BKI_FORCE_NOT_NULL; /* first\000second\000tgnargs\000 */ + bytea tgargs BKI_FORCE_NOT_NULL; /* first\000second\000tgnargs\000 */ pg_node_tree tgqual; /* WHEN expression, or NULL if none */ NameData tgoldtable; /* old transition table, or NULL if none */ NameData tgnewtable; /* new transition table, or NULL if none */ diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index e2a0ee0d8cb..358bfd84824 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -49,11 +49,11 @@ typedef struct ExplainState /* Hook for plugins to get control in ExplainOneQuery() */ typedef void (*ExplainOneQuery_hook_type) (Query *query, - int cursorOptions, - IntoClause *into, - ExplainState *es, - const char *queryString, - ParamListInfo params); + int cursorOptions, + IntoClause *into, + ExplainState *es, + const char *queryString, + ParamListInfo params); extern PGDLLIMPORT ExplainOneQuery_hook_type ExplainOneQuery_hook; /* Hook for plugins to get control in explain_get_index_name() */ diff --git a/src/include/commands/seclabel.h b/src/include/commands/seclabel.h index d317f394850..2e24801fc19 100644 --- a/src/include/commands/seclabel.h +++ b/src/include/commands/seclabel.h @@ -27,7 +27,7 @@ extern void DeleteSharedSecurityLabel(Oid objectId, Oid classId); extern ObjectAddress ExecSecLabelStmt(SecLabelStmt *stmt); typedef void (*check_object_relabel_type) (const ObjectAddress *object, - const char *seclabel); + const char *seclabel); extern void register_label_provider(const char *provider, check_object_relabel_type hook); diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 541c2fa3cf2..0fa585b091f 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -59,12 +59,12 @@ typedef struct VacAttrStats *VacAttrStatsP; typedef Datum (*AnalyzeAttrFetchFunc) (VacAttrStatsP stats, int rownum, - bool *isNull); + bool *isNull); typedef void (*AnalyzeAttrComputeStatsFunc) (VacAttrStatsP stats, - AnalyzeAttrFetchFunc fetchfunc, - int samplerows, - double totalrows); + AnalyzeAttrFetchFunc fetchfunc, + int samplerows, + double totalrows); typedef struct VacAttrStats { diff --git a/src/include/common/int128.h b/src/include/common/int128.h index 4c46e26f400..046f5b4903a 100644 --- a/src/include/common/int128.h +++ b/src/include/common/int128.h @@ -61,7 +61,7 @@ int128_add_int64(INT128 *i128, int64 v) static inline void int128_add_int64_mul_int64(INT128 *i128, int64 x, int64 y) { - *i128 += (int128) x *(int128) y; + *i128 += (int128) x * (int128) y; } /* diff --git a/src/include/common/ip.h b/src/include/common/ip.h index 815e6ccad3b..41d1be86adb 100644 --- a/src/include/common/ip.h +++ b/src/include/common/ip.h @@ -25,11 +25,11 @@ #endif extern int pg_getaddrinfo_all(const char *hostname, const char *servname, - const struct addrinfo * hintp, - struct addrinfo ** result); -extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo * ai); + const struct addrinfo *hintp, + struct addrinfo **result); +extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai); -extern int pg_getnameinfo_all(const struct sockaddr_storage * addr, int salen, +extern int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen, char *node, int nodelen, char *service, int servicelen, int flags); diff --git a/src/include/common/unicode_norm_table.h b/src/include/common/unicode_norm_table.h index 3bcf05e5eec..095481ab7f5 100644 --- a/src/include/common/unicode_norm_table.h +++ b/src/include/common/unicode_norm_table.h @@ -26,7 +26,8 @@ typedef struct } pg_unicode_decomposition; #define DECOMP_NO_COMPOSE 0x80 /* don't use for re-composition */ -#define DECOMP_INLINE 0x40 /* decomposition is stored inline in dec_index */ +#define DECOMP_INLINE 0x40 /* decomposition is stored inline in + * dec_index */ #define DECOMPOSITION_SIZE(x) ((x)->dec_size_flags & 0x3F) #define DECOMPOSITION_NO_COMPOSE(x) (((x)->dec_size_flags & DECOMP_NO_COMPOSE) != 0) diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 8cc5f3a413f..6544be96028 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -71,9 +71,9 @@ extern PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook; /* Hook for plugins to get control in ExecutorRun() */ typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc, - ScanDirection direction, - uint64 count, - bool execute_once); + ScanDirection direction, + uint64 count, + bool execute_once); extern PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook; /* Hook for plugins to get control in ExecutorFinish() */ diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index ac840533ee1..addcd09049d 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -66,7 +66,7 @@ typedef struct HashJoinTupleData struct HashJoinTupleData *next; /* link to next tuple in same bucket */ uint32 hashvalue; /* tuple's hash code */ /* Tuple data, in MinimalTuple format, follows on a MAXALIGN boundary */ -} HashJoinTupleData; +} HashJoinTupleData; #define HJTUPLE_OVERHEAD MAXALIGN(sizeof(HashJoinTupleData)) #define HJTUPLE_MINTUPLE(hjtup) \ @@ -116,7 +116,7 @@ typedef struct HashMemoryChunkData * list) */ char data[FLEXIBLE_ARRAY_MEMBER]; /* buffer allocated at the end */ -} HashMemoryChunkData; +} HashMemoryChunkData; typedef struct HashMemoryChunkData *HashMemoryChunk; @@ -186,6 +186,6 @@ typedef struct HashJoinTableData /* used for dense allocation of tuples (into linked chunks) */ HashMemoryChunk chunks; /* one list for the whole batch */ -} HashJoinTableData; +} HashJoinTableData; #endif /* HASHJOIN_H */ diff --git a/src/include/executor/tablefunc.h b/src/include/executor/tablefunc.h index 22ca916eb28..9c7b4808a8e 100644 --- a/src/include/executor/tablefunc.h +++ b/src/include/executor/tablefunc.h @@ -54,13 +54,13 @@ typedef struct TableFuncRoutine void (*InitOpaque) (struct TableFuncScanState *state, int natts); void (*SetDocument) (struct TableFuncScanState *state, Datum value); void (*SetNamespace) (struct TableFuncScanState *state, char *name, - char *uri); + char *uri); void (*SetRowFilter) (struct TableFuncScanState *state, char *path); void (*SetColumnFilter) (struct TableFuncScanState *state, - char *path, int colnum); + char *path, int colnum); bool (*FetchRow) (struct TableFuncScanState *state); Datum (*GetValue) (struct TableFuncScanState *state, int colnum, - Oid typid, int32 typmod, bool *isnull); + Oid typid, int32 typmod, bool *isnull); void (*DestroyOpaque) (struct TableFuncScanState *state); } TableFuncRoutine; diff --git a/src/include/fe_utils/mbprint.h b/src/include/fe_utils/mbprint.h index 56626f631b4..b5145726c51 100644 --- a/src/include/fe_utils/mbprint.h +++ b/src/include/fe_utils/mbprint.h @@ -22,7 +22,7 @@ struct lineptr extern unsigned char *mbvalidate(unsigned char *pwcs, int encoding); extern int pg_wcswidth(const char *pwcs, size_t len, int encoding); extern void pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding, - struct lineptr * lines, int count); + struct lineptr *lines, int count); extern void pg_wcssize(const unsigned char *pwcs, size_t len, int encoding, int *width, int *height, int *format_size); diff --git a/src/include/fe_utils/print.h b/src/include/fe_utils/print.h index d89b6febcbe..ce4d86ec54e 100644 --- a/src/include/fe_utils/print.h +++ b/src/include/fe_utils/print.h @@ -96,14 +96,14 @@ struct separator typedef struct printTableOpt { enum printFormat format; /* see enum above */ - unsigned short int expanded;/* expanded/vertical output (if supported by - * output format); 0=no, 1=yes, 2=auto */ + unsigned short int expanded; /* expanded/vertical output (if supported + * by output format); 0=no, 1=yes, 2=auto */ unsigned short int border; /* Print a border around the table. 0=none, * 1=dividing lines, 2=full */ unsigned short int pager; /* use pager for output (if to stdout and * stdout is a tty) 0=off 1=on 2=always */ - int pager_min_lines;/* don't use pager unless there are at least - * this many lines */ + int pager_min_lines; /* don't use pager unless there are at + * least this many lines */ bool tuples_only; /* don't output headers, row counts, etc. */ bool start_table; /* print start decoration, eg <table> */ bool stop_table; /* print stop decoration, eg </table> */ diff --git a/src/include/fe_utils/psqlscan.h b/src/include/fe_utils/psqlscan.h index e9c81439254..1eadf0b9c36 100644 --- a/src/include/fe_utils/psqlscan.h +++ b/src/include/fe_utils/psqlscan.h @@ -63,7 +63,7 @@ typedef struct PsqlScanCallbacks /* Fetch value of a variable, as a free'able string; NULL if unknown */ /* This pointer can be NULL if no variable substitution is wanted */ char *(*get_variable) (const char *varname, PsqlScanQuoteType quote, - void *passthrough); + void *passthrough); /* Print an error message someplace appropriate */ /* (very old gcc versions don't support attributes on function pointers) */ #if defined(__GNUC__) && __GNUC__ < 4 diff --git a/src/include/fmgr.h b/src/include/fmgr.h index cfb7b7774df..45e09c8c534 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -196,11 +196,11 @@ extern void fmgr_info_copy(FmgrInfo *dstinfo, FmgrInfo *srcinfo, * Note: it'd be nice if these could be macros, but I see no way to do that * without evaluating the arguments multiple times, which is NOT acceptable. */ -extern struct varlena *pg_detoast_datum(struct varlena * datum); -extern struct varlena *pg_detoast_datum_copy(struct varlena * datum); -extern struct varlena *pg_detoast_datum_slice(struct varlena * datum, +extern struct varlena *pg_detoast_datum(struct varlena *datum); +extern struct varlena *pg_detoast_datum_copy(struct varlena *datum); +extern struct varlena *pg_detoast_datum_slice(struct varlena *datum, int32 first, int32 count); -extern struct varlena *pg_detoast_datum_packed(struct varlena * datum); +extern struct varlena *pg_detoast_datum_packed(struct varlena *datum); #define PG_DETOAST_DATUM(datum) \ pg_detoast_datum((struct varlena *) DatumGetPointer(datum)) @@ -720,7 +720,7 @@ typedef enum FmgrHookEventType typedef bool (*needs_fmgr_hook_type) (Oid fn_oid); typedef void (*fmgr_hook_type) (FmgrHookEventType event, - FmgrInfo *flinfo, Datum *arg); + FmgrInfo *flinfo, Datum *arg); extern PGDLLIMPORT needs_fmgr_hook_type needs_fmgr_hook; extern PGDLLIMPORT fmgr_hook_type fmgr_hook; diff --git a/src/include/foreign/fdwapi.h b/src/include/foreign/fdwapi.h index 6ca44f734f9..2ed7049a147 100644 --- a/src/include/foreign/fdwapi.h +++ b/src/include/foreign/fdwapi.h @@ -25,87 +25,87 @@ struct ExplainState; */ typedef void (*GetForeignRelSize_function) (PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid); + RelOptInfo *baserel, + Oid foreigntableid); typedef void (*GetForeignPaths_function) (PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid); + RelOptInfo *baserel, + Oid foreigntableid); typedef ForeignScan *(*GetForeignPlan_function) (PlannerInfo *root, - RelOptInfo *baserel, - Oid foreigntableid, - ForeignPath *best_path, - List *tlist, - List *scan_clauses, - Plan *outer_plan); + RelOptInfo *baserel, + Oid foreigntableid, + ForeignPath *best_path, + List *tlist, + List *scan_clauses, + Plan *outer_plan); typedef void (*BeginForeignScan_function) (ForeignScanState *node, - int eflags); + int eflags); typedef TupleTableSlot *(*IterateForeignScan_function) (ForeignScanState *node); typedef bool (*RecheckForeignScan_function) (ForeignScanState *node, - TupleTableSlot *slot); + TupleTableSlot *slot); typedef void (*ReScanForeignScan_function) (ForeignScanState *node); typedef void (*EndForeignScan_function) (ForeignScanState *node); typedef void (*GetForeignJoinPaths_function) (PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outerrel, - RelOptInfo *innerrel, - JoinType jointype, - JoinPathExtraData *extra); + RelOptInfo *joinrel, + RelOptInfo *outerrel, + RelOptInfo *innerrel, + JoinType jointype, + JoinPathExtraData *extra); typedef void (*GetForeignUpperPaths_function) (PlannerInfo *root, - UpperRelationKind stage, - RelOptInfo *input_rel, - RelOptInfo *output_rel); + UpperRelationKind stage, + RelOptInfo *input_rel, + RelOptInfo *output_rel); typedef void (*AddForeignUpdateTargets_function) (Query *parsetree, - RangeTblEntry *target_rte, - Relation target_relation); + RangeTblEntry *target_rte, + Relation target_relation); typedef List *(*PlanForeignModify_function) (PlannerInfo *root, - ModifyTable *plan, - Index resultRelation, - int subplan_index); + ModifyTable *plan, + Index resultRelation, + int subplan_index); typedef void (*BeginForeignModify_function) (ModifyTableState *mtstate, - ResultRelInfo *rinfo, - List *fdw_private, - int subplan_index, - int eflags); + ResultRelInfo *rinfo, + List *fdw_private, + int subplan_index, + int eflags); typedef TupleTableSlot *(*ExecForeignInsert_function) (EState *estate, - ResultRelInfo *rinfo, - TupleTableSlot *slot, + ResultRelInfo *rinfo, + TupleTableSlot *slot, TupleTableSlot *planSlot); typedef TupleTableSlot *(*ExecForeignUpdate_function) (EState *estate, - ResultRelInfo *rinfo, - TupleTableSlot *slot, + ResultRelInfo *rinfo, + TupleTableSlot *slot, TupleTableSlot *planSlot); typedef TupleTableSlot *(*ExecForeignDelete_function) (EState *estate, - ResultRelInfo *rinfo, - TupleTableSlot *slot, + ResultRelInfo *rinfo, + TupleTableSlot *slot, TupleTableSlot *planSlot); typedef void (*EndForeignModify_function) (EState *estate, - ResultRelInfo *rinfo); + ResultRelInfo *rinfo); typedef int (*IsForeignRelUpdatable_function) (Relation rel); typedef bool (*PlanDirectModify_function) (PlannerInfo *root, - ModifyTable *plan, - Index resultRelation, - int subplan_index); + ModifyTable *plan, + Index resultRelation, + int subplan_index); typedef void (*BeginDirectModify_function) (ForeignScanState *node, - int eflags); + int eflags); typedef TupleTableSlot *(*IterateDirectModify_function) (ForeignScanState *node); @@ -115,46 +115,46 @@ typedef RowMarkType (*GetForeignRowMarkType_function) (RangeTblEntry *rte, LockClauseStrength strength); typedef HeapTuple (*RefetchForeignRow_function) (EState *estate, - ExecRowMark *erm, - Datum rowid, - bool *updated); + ExecRowMark *erm, + Datum rowid, + bool *updated); typedef void (*ExplainForeignScan_function) (ForeignScanState *node, - struct ExplainState *es); + struct ExplainState *es); typedef void (*ExplainForeignModify_function) (ModifyTableState *mtstate, - ResultRelInfo *rinfo, - List *fdw_private, - int subplan_index, - struct ExplainState *es); + ResultRelInfo *rinfo, + List *fdw_private, + int subplan_index, + struct ExplainState *es); typedef void (*ExplainDirectModify_function) (ForeignScanState *node, - struct ExplainState *es); + struct ExplainState *es); typedef int (*AcquireSampleRowsFunc) (Relation relation, int elevel, - HeapTuple *rows, int targrows, - double *totalrows, - double *totaldeadrows); + HeapTuple *rows, int targrows, + double *totalrows, + double *totaldeadrows); typedef bool (*AnalyzeForeignTable_function) (Relation relation, - AcquireSampleRowsFunc *func, - BlockNumber *totalpages); + AcquireSampleRowsFunc *func, + BlockNumber *totalpages); typedef List *(*ImportForeignSchema_function) (ImportForeignSchemaStmt *stmt, - Oid serverOid); + Oid serverOid); typedef Size (*EstimateDSMForeignScan_function) (ForeignScanState *node, - ParallelContext *pcxt); + ParallelContext *pcxt); typedef void (*InitializeDSMForeignScan_function) (ForeignScanState *node, - ParallelContext *pcxt, - void *coordinate); + ParallelContext *pcxt, + void *coordinate); typedef void (*InitializeWorkerForeignScan_function) (ForeignScanState *node, - shm_toc *toc, - void *coordinate); + shm_toc *toc, + void *coordinate); typedef void (*ShutdownForeignScan_function) (ForeignScanState *node); typedef bool (*IsForeignScanParallelSafe_function) (PlannerInfo *root, - RelOptInfo *rel, - RangeTblEntry *rte); + RelOptInfo *rel, + RangeTblEntry *rte); /* * FdwRoutine is the struct returned by a foreign-data wrapper's handler diff --git a/src/include/getaddrinfo.h b/src/include/getaddrinfo.h index c5595142a5e..e91128a339d 100644 --- a/src/include/getaddrinfo.h +++ b/src/include/getaddrinfo.h @@ -151,10 +151,10 @@ struct addrinfo #define getnameinfo pg_getnameinfo extern int getaddrinfo(const char *node, const char *service, - const struct addrinfo * hints, struct addrinfo ** res); -extern void freeaddrinfo(struct addrinfo * res); + const struct addrinfo *hints, struct addrinfo **res); +extern void freeaddrinfo(struct addrinfo *res); extern const char *gai_strerror(int errcode); -extern int getnameinfo(const struct sockaddr * sa, int salen, +extern int getnameinfo(const struct sockaddr *sa, int salen, char *node, int nodelen, char *service, int servicelen, int flags); #endif /* HAVE_GETADDRINFO */ diff --git a/src/include/getopt_long.h b/src/include/getopt_long.h index a16c5f9b14c..00692bb616c 100644 --- a/src/include/getopt_long.h +++ b/src/include/getopt_long.h @@ -30,7 +30,7 @@ struct option extern int getopt_long(int argc, char *const argv[], const char *optstring, - const struct option * longopts, int *longindex); + const struct option *longopts, int *longindex); #endif #endif /* GETOPT_LONG_H */ diff --git a/src/include/lib/pairingheap.h b/src/include/lib/pairingheap.h index 9ee90befe5a..0b03a24fa13 100644 --- a/src/include/lib/pairingheap.h +++ b/src/include/lib/pairingheap.h @@ -58,8 +58,8 @@ typedef struct pairingheap_node * and >0 iff a > b. For a min-heap, the conditions are reversed. */ typedef int (*pairingheap_comparator) (const pairingheap_node *a, - const pairingheap_node *b, - void *arg); + const pairingheap_node *b, + void *arg); /* * A pairing heap. diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h index 56b261d8ea9..061d9c373f1 100644 --- a/src/include/lib/simplehash.h +++ b/src/include/lib/simplehash.h @@ -121,7 +121,7 @@ typedef struct SH_TYPE /* user defined data, useful for callbacks */ void *private_data; -} SH_TYPE; +} SH_TYPE; typedef enum SH_STATUS { @@ -134,19 +134,19 @@ typedef struct SH_ITERATOR uint32 cur; /* current element */ uint32 end; bool done; /* iterator exhausted? */ -} SH_ITERATOR; +} SH_ITERATOR; /* externally visible function prototypes */ -SH_SCOPE SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements, +SH_SCOPE SH_TYPE *SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data); SH_SCOPE void SH_DESTROY(SH_TYPE * tb); SH_SCOPE void SH_GROW(SH_TYPE * tb, uint32 newsize); -SH_SCOPE SH_ELEMENT_TYPE *SH_INSERT(SH_TYPE * tb, SH_KEY_TYPE key, bool *found); -SH_SCOPE SH_ELEMENT_TYPE *SH_LOOKUP(SH_TYPE * tb, SH_KEY_TYPE key); +SH_SCOPE SH_ELEMENT_TYPE *SH_INSERT(SH_TYPE * tb, SH_KEY_TYPE key, bool *found); +SH_SCOPE SH_ELEMENT_TYPE *SH_LOOKUP(SH_TYPE * tb, SH_KEY_TYPE key); SH_SCOPE bool SH_DELETE(SH_TYPE * tb, SH_KEY_TYPE key); SH_SCOPE void SH_START_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter); SH_SCOPE void SH_START_ITERATE_AT(SH_TYPE * tb, SH_ITERATOR * iter, uint32 at); -SH_SCOPE SH_ELEMENT_TYPE *SH_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter); +SH_SCOPE SH_ELEMENT_TYPE *SH_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter); SH_SCOPE void SH_STAT(SH_TYPE * tb); #endif /* SH_DECLARE */ @@ -324,7 +324,7 @@ SH_FREE(SH_TYPE * type, void *pointer) * Memory other than for the array of elements will still be allocated from * the passed-in context. */ -SH_SCOPE SH_TYPE * +SH_SCOPE SH_TYPE * SH_CREATE(MemoryContext ctx, uint32 nelements, void *private_data) { SH_TYPE *tb; @@ -470,7 +470,7 @@ SH_GROW(SH_TYPE * tb, uint32 newsize) * already exists, false otherwise. Returns the hash-table entry in either * case. */ -SH_SCOPE SH_ELEMENT_TYPE * +SH_SCOPE SH_ELEMENT_TYPE * SH_INSERT(SH_TYPE * tb, SH_KEY_TYPE key, bool *found) { uint32 hash = SH_HASH_KEY(tb, key); @@ -634,7 +634,7 @@ restart: /* * Lookup up entry in hash table. Returns NULL if key not present. */ -SH_SCOPE SH_ELEMENT_TYPE * +SH_SCOPE SH_ELEMENT_TYPE * SH_LOOKUP(SH_TYPE * tb, SH_KEY_TYPE key) { uint32 hash = SH_HASH_KEY(tb, key); @@ -803,7 +803,7 @@ SH_START_ITERATE_AT(SH_TYPE * tb, SH_ITERATOR * iter, uint32 at) * deletions), but if so, there's neither a guarantee that all nodes are * visited at least once, nor a guarantee that a node is visited at most once. */ -SH_SCOPE SH_ELEMENT_TYPE * +SH_SCOPE SH_ELEMENT_TYPE * SH_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter) { while (!iter->done) diff --git a/src/include/libpq/ifaddr.h b/src/include/libpq/ifaddr.h index 5f6f48598f3..f11bb4a0735 100644 --- a/src/include/libpq/ifaddr.h +++ b/src/include/libpq/ifaddr.h @@ -14,15 +14,15 @@ #include "libpq/pqcomm.h" /* pgrminclude ignore */ -typedef void (*PgIfAddrCallback) (struct sockaddr * addr, - struct sockaddr * netmask, - void *cb_data); +typedef void (*PgIfAddrCallback) (struct sockaddr *addr, + struct sockaddr *netmask, + void *cb_data); -extern int pg_range_sockaddr(const struct sockaddr_storage * addr, - const struct sockaddr_storage * netaddr, - const struct sockaddr_storage * netmask); +extern int pg_range_sockaddr(const struct sockaddr_storage *addr, + const struct sockaddr_storage *netaddr, + const struct sockaddr_storage *netmask); -extern int pg_sockaddr_cidr_mask(struct sockaddr_storage * mask, +extern int pg_sockaddr_cidr_mask(struct sockaddr_storage *mask, char *numbits, int family); extern int pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data); diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 0669b924cf2..5774a6df3ff 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -121,8 +121,8 @@ typedef struct Port SockAddr laddr; /* local addr (postmaster) */ SockAddr raddr; /* remote addr (client) */ char *remote_host; /* name (or ip addr) of remote host */ - char *remote_hostname;/* name (not ip addr) of remote host, if - * available */ + char *remote_hostname; /* name (not ip addr) of remote host, if + * available */ int remote_hostname_resolv; /* see above */ int remote_hostname_errcode; /* see above */ char *remote_port; /* text rep of remote port */ diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h index 737ab1c7133..33f2c3018ed 100644 --- a/src/include/mb/pg_wchar.h +++ b/src/include/mb/pg_wchar.h @@ -133,10 +133,12 @@ typedef unsigned int pg_wchar; #define LC_JISX0212 0x94 /* Japanese Kanji (JIS X 0212) */ #define LC_CNS11643_1 0x95 /* CNS 11643-1992 Plane 1 */ #define LC_CNS11643_2 0x96 /* CNS 11643-1992 Plane 2 */ -#define LC_JISX0213_1 0x97/* Japanese Kanji (JIS X 0213 Plane 1) (not - * supported) */ -#define LC_BIG5_1 0x98 /* Plane 1 Chinese traditional (not supported) */ -#define LC_BIG5_2 0x99 /* Plane 1 Chinese traditional (not supported) */ +#define LC_JISX0213_1 0x97 /* Japanese Kanji (JIS X 0213 Plane 1) + * (not supported) */ +#define LC_BIG5_1 0x98 /* Plane 1 Chinese traditional (not + * supported) */ +#define LC_BIG5_2 0x99 /* Plane 1 Chinese traditional (not + * supported) */ /* Is a leading byte for "official" multibyte encodings? */ #define IS_LC2(c) ((unsigned char)(c) >= 0x90 && (unsigned char)(c) <= 0x99) @@ -168,44 +170,44 @@ typedef unsigned int pg_wchar; /* * Charset IDs for private single byte encodings (0xa0-0xef) */ -#define LC_SISHENG 0xa0/* Chinese SiSheng characters for - * PinYin/ZhuYin (not supported) */ -#define LC_IPA 0xa1/* IPA (International Phonetic Association) - * (not supported) */ -#define LC_VISCII_LOWER 0xa2/* Vietnamese VISCII1.1 lower-case (not - * supported) */ -#define LC_VISCII_UPPER 0xa3/* Vietnamese VISCII1.1 upper-case (not - * supported) */ +#define LC_SISHENG 0xa0 /* Chinese SiSheng characters for + * PinYin/ZhuYin (not supported) */ +#define LC_IPA 0xa1 /* IPA (International Phonetic + * Association) (not supported) */ +#define LC_VISCII_LOWER 0xa2 /* Vietnamese VISCII1.1 lower-case (not + * supported) */ +#define LC_VISCII_UPPER 0xa3 /* Vietnamese VISCII1.1 upper-case (not + * supported) */ #define LC_ARABIC_DIGIT 0xa4 /* Arabic digit (not supported) */ #define LC_ARABIC_1_COLUMN 0xa5 /* Arabic 1-column (not supported) */ #define LC_ASCII_RIGHT_TO_LEFT 0xa6 /* ASCII (left half of ISO8859-1) with * right-to-left direction (not * supported) */ -#define LC_LAO 0xa7/* Lao characters (ISO10646 0E80..0EDF) (not - * supported) */ +#define LC_LAO 0xa7 /* Lao characters (ISO10646 0E80..0EDF) + * (not supported) */ #define LC_ARABIC_2_COLUMN 0xa8 /* Arabic 1-column (not supported) */ /* * Charset IDs for private multibyte encodings (0xf0-0xff) */ -#define LC_INDIAN_1_COLUMN 0xf0/* Indian charset for 1-column width glyphs - * (not supported) */ -#define LC_TIBETAN_1_COLUMN 0xf1/* Tibetan 1-column width glyphs (not - * supported) */ -#define LC_UNICODE_SUBSET_2 0xf2/* Unicode characters of the range - * U+2500..U+33FF. (not supported) */ -#define LC_UNICODE_SUBSET_3 0xf3/* Unicode characters of the range - * U+E000..U+FFFF. (not supported) */ -#define LC_UNICODE_SUBSET 0xf4/* Unicode characters of the range - * U+0100..U+24FF. (not supported) */ +#define LC_INDIAN_1_COLUMN 0xf0 /* Indian charset for 1-column width + * glyphs (not supported) */ +#define LC_TIBETAN_1_COLUMN 0xf1 /* Tibetan 1-column width glyphs (not + * supported) */ +#define LC_UNICODE_SUBSET_2 0xf2 /* Unicode characters of the range + * U+2500..U+33FF. (not supported) */ +#define LC_UNICODE_SUBSET_3 0xf3 /* Unicode characters of the range + * U+E000..U+FFFF. (not supported) */ +#define LC_UNICODE_SUBSET 0xf4 /* Unicode characters of the range + * U+0100..U+24FF. (not supported) */ #define LC_ETHIOPIC 0xf5 /* Ethiopic characters (not supported) */ #define LC_CNS11643_3 0xf6 /* CNS 11643-1992 Plane 3 */ #define LC_CNS11643_4 0xf7 /* CNS 11643-1992 Plane 4 */ #define LC_CNS11643_5 0xf8 /* CNS 11643-1992 Plane 5 */ #define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */ #define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */ -#define LC_INDIAN_2_COLUMN 0xfb/* Indian charset for 2-column width glyphs - * (not supported) */ +#define LC_INDIAN_2_COLUMN 0xfb /* Indian charset for 2-column width + * glyphs (not supported) */ #define LC_TIBETAN 0xfc /* Tibetan (not supported) */ /* #define FREE 0xfd free (unused) */ /* #define FREE 0xfe free (unused) */ @@ -342,12 +344,12 @@ extern const char *get_encoding_name_for_icu(int encoding); * pg_wchar stuff */ typedef int (*mb2wchar_with_len_converter) (const unsigned char *from, - pg_wchar *to, - int len); + pg_wchar *to, + int len); typedef int (*wchar2mb_with_len_converter) (const pg_wchar *from, - unsigned char *to, - int len); + unsigned char *to, + int len); typedef int (*mblen_converter) (const unsigned char *mbstr); diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 9c0852853af..7cb3fc922c2 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -43,8 +43,8 @@ struct ExprContext; struct ExprEvalStep; /* avoid including execExpr.h everywhere */ typedef Datum (*ExprStateEvalFunc) (struct ExprState *expression, - struct ExprContext *econtext, - bool *isNull); + struct ExprContext *econtext, + bool *isNull); /* Bits in ExprState->flags (see also execExpr.h for private flag bits): */ /* expression is for use with ExecQual() */ @@ -593,7 +593,7 @@ typedef struct TupleHashTableData FmgrInfo *in_hash_funcs; /* hash functions for input datatype(s) */ FmgrInfo *cur_eq_funcs; /* equality functions for input vs. table */ uint32 hash_iv; /* hash-function IV */ -} TupleHashTableData; +} TupleHashTableData; typedef tuplehash_iterator TupleHashIterator; @@ -1831,12 +1831,12 @@ typedef struct WindowAggState bool partition_spooled; /* true if all tuples in current * partition have been spooled into * tuplestore */ - bool more_partitions;/* true if there's more partitions after this - * one */ - bool framehead_valid;/* true if frameheadpos is known up to date - * for current row */ - bool frametail_valid;/* true if frametailpos is known up to date - * for current row */ + bool more_partitions; /* true if there's more partitions after + * this one */ + bool framehead_valid; /* true if frameheadpos is known up to + * date for current row */ + bool frametail_valid; /* true if frametailpos is known up to + * date for current row */ TupleTableSlot *first_part_slot; /* first tuple of current or next * partition */ diff --git a/src/include/nodes/extensible.h b/src/include/nodes/extensible.h index 0b02cc18e99..6ba7ad27a2f 100644 --- a/src/include/nodes/extensible.h +++ b/src/include/nodes/extensible.h @@ -62,11 +62,11 @@ typedef struct ExtensibleNodeMethods const char *extnodename; Size node_size; void (*nodeCopy) (struct ExtensibleNode *newnode, - const struct ExtensibleNode *oldnode); + const struct ExtensibleNode *oldnode); bool (*nodeEqual) (const struct ExtensibleNode *a, - const struct ExtensibleNode *b); + const struct ExtensibleNode *b); void (*nodeOut) (struct StringInfoData *str, - const struct ExtensibleNode *node); + const struct ExtensibleNode *node); void (*nodeRead) (struct ExtensibleNode *node); } ExtensibleNodeMethods; @@ -91,12 +91,12 @@ typedef struct CustomPathMethods /* Convert Path to a Plan */ struct Plan *(*PlanCustomPath) (PlannerInfo *root, - RelOptInfo *rel, - struct CustomPath *best_path, - List *tlist, - List *clauses, - List *custom_plans); -} CustomPathMethods; + RelOptInfo *rel, + struct CustomPath *best_path, + List *tlist, + List *clauses, + List *custom_plans); +} CustomPathMethods; /* * Custom scan. Here again, there's not much to do: we need to be able to @@ -120,8 +120,8 @@ typedef struct CustomExecMethods /* Required executor methods */ void (*BeginCustomScan) (CustomScanState *node, - EState *estate, - int eflags); + EState *estate, + int eflags); TupleTableSlot *(*ExecCustomScan) (CustomScanState *node); void (*EndCustomScan) (CustomScanState *node); void (*ReScanCustomScan) (CustomScanState *node); @@ -132,19 +132,19 @@ typedef struct CustomExecMethods /* Optional methods: needed if parallel execution is supported */ Size (*EstimateDSMCustomScan) (CustomScanState *node, - ParallelContext *pcxt); + ParallelContext *pcxt); void (*InitializeDSMCustomScan) (CustomScanState *node, - ParallelContext *pcxt, - void *coordinate); + ParallelContext *pcxt, + void *coordinate); void (*InitializeWorkerCustomScan) (CustomScanState *node, - shm_toc *toc, - void *coordinate); + shm_toc *toc, + void *coordinate); void (*ShutdownCustomScan) (CustomScanState *node); /* Optional: print additional information in EXPLAIN */ void (*ExplainCustomScan) (CustomScanState *node, - List *ancestors, - ExplainState *es); + List *ancestors, + ExplainState *es); } CustomExecMethods; extern void RegisterCustomScanMethods(const CustomScanMethods *methods); diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h index fe6bc903b36..bcf81304fd2 100644 --- a/src/include/nodes/memnodes.h +++ b/src/include/nodes/memnodes.h @@ -63,7 +63,7 @@ typedef struct MemoryContextMethods Size (*get_chunk_space) (MemoryContext context, void *pointer); bool (*is_empty) (MemoryContext context); void (*stats) (MemoryContext context, int level, bool print, - MemoryContextCounters *totals); + MemoryContextCounters *totals); #ifdef MEMORY_CONTEXT_CHECKING void (*check) (MemoryContext context); #endif diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h index b6c9b48ee62..cda925397bf 100644 --- a/src/include/nodes/nodeFuncs.h +++ b/src/include/nodes/nodeFuncs.h @@ -51,30 +51,30 @@ extern bool check_functions_in_node(Node *node, check_function_callback checker, void *context); extern bool expression_tree_walker(Node *node, bool (*walker) (), - void *context); + void *context); extern Node *expression_tree_mutator(Node *node, Node *(*mutator) (), - void *context); + void *context); extern bool query_tree_walker(Query *query, bool (*walker) (), - void *context, int flags); + void *context, int flags); extern Query *query_tree_mutator(Query *query, Node *(*mutator) (), - void *context, int flags); + void *context, int flags); extern bool range_table_walker(List *rtable, bool (*walker) (), - void *context, int flags); + void *context, int flags); extern List *range_table_mutator(List *rtable, Node *(*mutator) (), - void *context, int flags); + void *context, int flags); extern bool query_or_expression_tree_walker(Node *node, bool (*walker) (), - void *context, int flags); + void *context, int flags); extern Node *query_or_expression_tree_mutator(Node *node, Node *(*mutator) (), - void *context, int flags); + void *context, int flags); extern bool raw_expression_tree_walker(Node *node, bool (*walker) (), - void *context); + void *context); struct PlanState; extern bool planstate_tree_walker(struct PlanState *planstate, bool (*walker) (), - void *context); + void *context); #endif /* NODEFUNCS_H */ diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 15de9363557..35c3c7db2ac 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -614,6 +614,7 @@ extern int16 *readAttrNumberCols(int numCols); * nodes/copyfuncs.c */ extern void *copyObjectImpl(const void *obj); + /* cast result back to argument type, if supported by compiler */ #ifdef HAVE_TYPEOF #define copyObject(obj) ((typeof(obj)) copyObjectImpl(obj)) diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h index e19ac245828..bb1618c753d 100644 --- a/src/include/nodes/params.h +++ b/src/include/nodes/params.h @@ -74,7 +74,7 @@ typedef struct ParamListInfoData int numParams; /* number of ParamExternDatas following */ struct Bitmapset *paramMask; /* if non-NULL, can ignore omitted params */ ParamExternData params[FLEXIBLE_ARRAY_MEMBER]; -} ParamListInfoData; +} ParamListInfoData; /* ---------------- diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 48ea5478874..3864635f4c7 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -2099,7 +2099,8 @@ typedef struct Constraint char fk_upd_action; /* ON UPDATE action */ char fk_del_action; /* ON DELETE action */ List *old_conpfeqop; /* pg_constraint.conpfeqop of my former self */ - Oid old_pktable_oid; /* pg_constraint.confrelid of my former self */ + Oid old_pktable_oid; /* pg_constraint.confrelid of my former + * self */ /* Fields used for constraints that allow a NOT VALID specification */ bool skip_validation; /* skip validation of existing rows? */ diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index 86ec82eaaae..edca5d2816e 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -400,10 +400,11 @@ typedef struct ArrayRef Oid refelemtype; /* type of the array elements */ int32 reftypmod; /* typmod of the array (and elements too) */ Oid refcollid; /* OID of collation, or InvalidOid if none */ - List *refupperindexpr;/* expressions that evaluate to upper array - * indexes */ - List *reflowerindexpr;/* expressions that evaluate to lower array - * indexes, or NIL for single array element */ + List *refupperindexpr; /* expressions that evaluate to upper + * array indexes */ + List *reflowerindexpr; /* expressions that evaluate to lower + * array indexes, or NIL for single array + * element */ Expr *refexpr; /* the expression that evaluates to an array * value */ Expr *refassgnexpr; /* expression for the source value, or NULL if @@ -1367,8 +1368,8 @@ typedef struct TargetEntry Expr *expr; /* expression to evaluate */ AttrNumber resno; /* attribute number (see notes above) */ char *resname; /* name of the column (could be NULL) */ - Index ressortgroupref;/* nonzero if referenced by a sort/group - * clause */ + Index ressortgroupref; /* nonzero if referenced by a sort/group + * clause */ Oid resorigtbl; /* OID of column's source table */ AttrNumber resorigcol; /* column's number in source table */ bool resjunk; /* set to true to eliminate the attribute from diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 902e9faf12a..077e1ceedd1 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -577,7 +577,8 @@ typedef struct RelOptInfo void *fdw_private; /* cache space for remembering if we have proven this relation unique */ - List *unique_for_rels; /* known unique for these other relid set(s) */ + List *unique_for_rels; /* known unique for these other relid + * set(s) */ List *non_unique_for_rels; /* known not unique for these set(s) */ /* used by various scans and joins: */ @@ -655,10 +656,11 @@ typedef struct IndexOptInfo List *indextlist; /* targetlist representing index columns */ - List *indrestrictinfo;/* parent relation's baserestrictinfo list, - * less any conditions implied by the index's - * predicate (unless it's a target rel, see - * comments in check_index_predicates()) */ + List *indrestrictinfo; /* parent relation's baserestrictinfo + * list, less any conditions implied by + * the index's predicate (unless it's a + * target rel, see comments in + * check_index_predicates()) */ bool predOK; /* true if index predicate matches query */ bool unique; /* true if a unique index */ diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 3cf681e91b1..a8cedb8f78a 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -36,7 +36,7 @@ typedef enum CONSTRAINT_EXCLUSION_OFF, /* do not use c_e */ CONSTRAINT_EXCLUSION_ON, /* apply c_e to all rels */ CONSTRAINT_EXCLUSION_PARTITION /* apply c_e to otherrels only */ -} ConstraintExclusionType; +} ConstraintExclusionType; /* diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index a216f9e9127..807729c74a3 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -27,24 +27,24 @@ extern int min_parallel_index_scan_size; /* Hook for plugins to get control in set_rel_pathlist() */ typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root, - RelOptInfo *rel, - Index rti, - RangeTblEntry *rte); + RelOptInfo *rel, + Index rti, + RangeTblEntry *rte); extern PGDLLIMPORT set_rel_pathlist_hook_type set_rel_pathlist_hook; /* Hook for plugins to get control in add_paths_to_joinrel() */ typedef void (*set_join_pathlist_hook_type) (PlannerInfo *root, - RelOptInfo *joinrel, - RelOptInfo *outerrel, - RelOptInfo *innerrel, - JoinType jointype, - JoinPathExtraData *extra); + RelOptInfo *joinrel, + RelOptInfo *outerrel, + RelOptInfo *innerrel, + JoinType jointype, + JoinPathExtraData *extra); extern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook; /* Hook for plugins to replace standard_join_search() */ typedef RelOptInfo *(*join_search_hook_type) (PlannerInfo *root, - int levels_needed, - List *initial_rels); + int levels_needed, + List *initial_rels); extern PGDLLIMPORT join_search_hook_type join_search_hook; @@ -117,10 +117,10 @@ extern bool have_dangerous_phv(PlannerInfo *root, * routines for managing EquivalenceClasses */ typedef bool (*ec_matches_callback_type) (PlannerInfo *root, - RelOptInfo *rel, - EquivalenceClass *ec, - EquivalenceMember *em, - void *arg); + RelOptInfo *rel, + EquivalenceClass *ec, + EquivalenceMember *em, + void *arg); extern bool process_equivalence(PlannerInfo *root, RestrictInfo *restrictinfo, bool below_outer_join); diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index 68fd713b090..16960c28590 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.h @@ -19,9 +19,9 @@ /* Hook for plugins to get control in get_relation_info() */ typedef void (*get_relation_info_hook_type) (PlannerInfo *root, - Oid relationObjectId, - bool inhparent, - RelOptInfo *rel); + Oid relationObjectId, + bool inhparent, + RelOptInfo *rel); extern PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook; diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index e773c0f7eda..e3cde2595b3 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -23,7 +23,7 @@ typedef enum FORCE_PARALLEL_OFF, FORCE_PARALLEL_ON, FORCE_PARALLEL_REGRESS -} ForceParallelMode; +} ForceParallelMode; /* GUC parameters */ #define DEFAULT_CURSOR_TUPLE_FRACTION 0.1 diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index f3aaa23975c..41667f2c413 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -20,15 +20,15 @@ /* Hook for plugins to get control in planner() */ typedef PlannedStmt *(*planner_hook_type) (Query *parse, - int cursorOptions, - ParamListInfo boundParams); + int cursorOptions, + ParamListInfo boundParams); extern PGDLLIMPORT planner_hook_type planner_hook; /* Hook for plugins to get control when grouping_planner() plans upper rels */ typedef void (*create_upper_paths_hook_type) (PlannerInfo *root, - UpperRelationKind stage, - RelOptInfo *input_rel, - RelOptInfo *output_rel); + UpperRelationKind stage, + RelOptInfo *input_rel, + RelOptInfo *output_rel); extern PGDLLIMPORT create_upper_paths_hook_type create_upper_paths_hook; diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index 9b33ba5dfd1..4d7d06a1622 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -18,7 +18,7 @@ /* Hook for plugins to get control at end of parse analysis */ typedef void (*post_parse_analyze_hook_type) (ParseState *pstate, - Query *query); + Query *query); extern PGDLLIMPORT post_parse_analyze_hook_type post_parse_analyze_hook; diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index 6a3507f3b14..cc424ece039 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -80,8 +80,8 @@ typedef Node *(*PreParseColumnRefHook) (ParseState *pstate, ColumnRef *cref); typedef Node *(*PostParseColumnRefHook) (ParseState *pstate, ColumnRef *cref, Node *var); typedef Node *(*ParseParamRefHook) (ParseState *pstate, ParamRef *pref); typedef Node *(*CoerceParamHook) (ParseState *pstate, Param *param, - Oid targetTypeId, int32 targetTypeMod, - int location); + Oid targetTypeId, int32 targetTypeMod, + int location); /* diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h index c8ad710dac0..3895e03c6c3 100644 --- a/src/include/parser/parser.h +++ b/src/include/parser/parser.h @@ -23,7 +23,7 @@ typedef enum BACKSLASH_QUOTE_OFF, BACKSLASH_QUOTE_ON, BACKSLASH_QUOTE_SAFE_ENCODING -} BackslashQuoteType; +} BackslashQuoteType; /* GUC variables in scan.l (every one of these is a bad idea :-() */ extern int backslash_quote; diff --git a/src/include/pg_getopt.h b/src/include/pg_getopt.h index 2e25576499a..c356ba197e1 100644 --- a/src/include/pg_getopt.h +++ b/src/include/pg_getopt.h @@ -40,7 +40,7 @@ extern int optreset; #endif #ifndef HAVE_GETOPT -extern int getopt(int nargc, char *const * nargv, const char *ostr); +extern int getopt(int nargc, char *const *nargv, const char *ostr); #endif #endif /* PG_GETOPT_H */ diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 5e029c0f4ef..bcf20ced591 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -39,7 +39,7 @@ typedef enum TrackFunctionsLevel TRACK_FUNC_OFF, TRACK_FUNC_PL, TRACK_FUNC_ALL -} TrackFunctionsLevel; +} TrackFunctionsLevel; /* ---------- * The types of backend -> collector messages diff --git a/src/include/pgtime.h b/src/include/pgtime.h index 52b54b920ad..3624dbdf420 100644 --- a/src/include/pgtime.h +++ b/src/include/pgtime.h @@ -66,7 +66,7 @@ extern bool pg_tz_acceptable(pg_tz *tz); /* these functions are in strftime.c */ extern size_t pg_strftime(char *s, size_t max, const char *format, - const struct pg_tm * tm); + const struct pg_tm *tm); /* these functions and variables are in pgtz.c */ diff --git a/src/include/port.h b/src/include/port.h index 52910ed203f..0fa030ea818 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -271,7 +271,7 @@ extern bool rmtree(const char *path, bool rmtopdir); */ #if defined(WIN32) && !defined(__CYGWIN__) && !defined(UNSAFE_STAT_OK) #include <sys/stat.h> -extern int pgwin32_safestat(const char *path, struct stat * buf); +extern int pgwin32_safestat(const char *path, struct stat *buf); #define stat(a,b) pgwin32_safestat(a,b) #endif @@ -317,7 +317,7 @@ extern FILE *pgwin32_popen(const char *command, const char *type); /* New versions of MingW have gettimeofday, old mingw and msvc don't */ #ifndef HAVE_GETTIMEOFDAY /* Last parameter not used */ -extern int gettimeofday(struct timeval * tp, struct timezone * tzp); +extern int gettimeofday(struct timeval *tp, struct timezone *tzp); #endif #else /* !WIN32 */ @@ -392,7 +392,7 @@ extern double rint(double x); #ifndef HAVE_INET_ATON #include <netinet/in.h> #include <arpa/inet.h> -extern int inet_aton(const char *cp, struct in_addr * addr); +extern int inet_aton(const char *cp, struct in_addr *addr); #endif #if !HAVE_DECL_STRLCAT @@ -423,14 +423,14 @@ extern void srandom(unsigned int seed); extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen); #ifndef WIN32 -extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer, - size_t buflen, struct passwd ** result); +extern int pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer, + size_t buflen, struct passwd **result); #endif extern int pqGethostbyname(const char *name, - struct hostent * resultbuf, + struct hostent *resultbuf, char *buffer, size_t buflen, - struct hostent ** result, + struct hostent **result, int *herrno); extern void pg_qsort(void *base, size_t nel, size_t elsize, diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 0debb3b3f42..43505f23e02 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -222,7 +222,7 @@ struct itimerval struct timeval it_value; }; -int setitimer(int which, const struct itimerval * value, struct itimerval * ovalue); +int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue); /* * WIN32 does not provide 64-bit off_t, but does provide the functions operating @@ -376,11 +376,11 @@ void pg_queue_signal(int signum); #define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags) SOCKET pgwin32_socket(int af, int type, int protocol); -int pgwin32_bind(SOCKET s, struct sockaddr * addr, int addrlen); +int pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen); int pgwin32_listen(SOCKET s, int backlog); -SOCKET pgwin32_accept(SOCKET s, struct sockaddr * addr, int *addrlen); -int pgwin32_connect(SOCKET s, const struct sockaddr * name, int namelen); -int pgwin32_select(int nfds, fd_set *readfs, fd_set *writefds, fd_set *exceptfds, const struct timeval * timeout); +SOCKET pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen); +int pgwin32_connect(SOCKET s, const struct sockaddr *name, int namelen); +int pgwin32_select(int nfds, fd_set *readfs, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout); int pgwin32_recv(SOCKET s, char *buf, int len, int flags); int pgwin32_send(SOCKET s, const void *buf, int len, int flags); diff --git a/src/include/postgres.h b/src/include/postgres.h index 009337d2688..70ffdc6e173 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -71,7 +71,7 @@ typedef struct varatt_external int32 va_extsize; /* External saved size (doesn't) */ Oid va_valueid; /* Unique ID of value within TOAST table */ Oid va_toastrelid; /* RelID of TOAST table containing it */ -} varatt_external; +} varatt_external; /* * struct varatt_indirect is a "TOAST pointer" representing an out-of-line @@ -85,7 +85,7 @@ typedef struct varatt_external typedef struct varatt_indirect { struct varlena *pointer; /* Pointer to in-memory varlena */ -} varatt_indirect; +} varatt_indirect; /* * struct varatt_expanded is a "TOAST pointer" representing an out-of-line diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h index 51a5978ea87..be4d3d27dab 100644 --- a/src/include/postmaster/bgworker.h +++ b/src/include/postmaster/bgworker.h @@ -119,9 +119,7 @@ extern bool RegisterDynamicBackgroundWorker(BackgroundWorker *worker, /* Query the status of a bgworker */ extern BgwHandleStatus GetBackgroundWorkerPid(BackgroundWorkerHandle *handle, pid_t *pidp); -extern BgwHandleStatus -WaitForBackgroundWorkerStartup(BackgroundWorkerHandle * - handle, pid_t *pid); +extern BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pid); extern BgwHandleStatus WaitForBackgroundWorkerShutdown(BackgroundWorkerHandle *); diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h index 69816f1449a..8d3221e4a4a 100644 --- a/src/include/regex/regguts.h +++ b/src/include/regex/regguts.h @@ -479,4 +479,4 @@ struct guts /* prototypes for functions that are exported from regcomp.c to regexec.c */ extern void pg_set_regex_collation(Oid collation); -extern color pg_reg_getcolor(struct colormap * cm, chr c); +extern color pg_reg_getcolor(struct colormap *cm, chr c); diff --git a/src/include/replication/logical.h b/src/include/replication/logical.h index 159da7f23f9..9e640be9849 100644 --- a/src/include/replication/logical.h +++ b/src/include/replication/logical.h @@ -19,17 +19,17 @@ struct LogicalDecodingContext; typedef void (*LogicalOutputPluginWriterWrite) ( struct LogicalDecodingContext *lr, - XLogRecPtr Ptr, - TransactionId xid, - bool last_write + XLogRecPtr Ptr, + TransactionId xid, + bool last_write ); typedef LogicalOutputPluginWriterWrite LogicalOutputPluginWriterPrepareWrite; typedef void (*LogicalOutputPluginWriterUpdateProgress) ( struct LogicalDecodingContext *lr, - XLogRecPtr Ptr, - TransactionId xid + XLogRecPtr Ptr, + TransactionId xid ); typedef struct LogicalDecodingContext diff --git a/src/include/replication/output_plugin.h b/src/include/replication/output_plugin.h index 2435e2be2d2..511216a295a 100644 --- a/src/include/replication/output_plugin.h +++ b/src/include/replication/output_plugin.h @@ -42,47 +42,47 @@ typedef void (*LogicalOutputPluginInit) (struct OutputPluginCallbacks *cb); * the same slot is used from there one, it will be "false". */ typedef void (*LogicalDecodeStartupCB) (struct LogicalDecodingContext *ctx, - OutputPluginOptions *options, - bool is_init); + OutputPluginOptions *options, + bool is_init); /* * Callback called for every (explicit or implicit) BEGIN of a successful * transaction. */ typedef void (*LogicalDecodeBeginCB) (struct LogicalDecodingContext *ctx, - ReorderBufferTXN *txn); + ReorderBufferTXN *txn); /* * Callback for every individual change in a successful transaction. */ typedef void (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, - Relation relation, - ReorderBufferChange *change); + ReorderBufferTXN *txn, + Relation relation, + ReorderBufferChange *change); /* * Called for every (explicit or implicit) COMMIT of a successful transaction. */ typedef void (*LogicalDecodeCommitCB) (struct LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, - XLogRecPtr commit_lsn); + ReorderBufferTXN *txn, + XLogRecPtr commit_lsn); /* * Called for the generic logical decoding messages. */ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx, - ReorderBufferTXN *txn, - XLogRecPtr message_lsn, - bool transactional, - const char *prefix, - Size message_size, - const char *message); + ReorderBufferTXN *txn, + XLogRecPtr message_lsn, + bool transactional, + const char *prefix, + Size message_size, + const char *message); /* * Filter changes by origin. */ typedef bool (*LogicalDecodeFilterByOriginCB) (struct LogicalDecodingContext *ctx, - RepOriginId origin_id); + RepOriginId origin_id); /* * Called to shutdown an output plugin. diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h index 1d9a1d343e7..e722f4dcf5e 100644 --- a/src/include/replication/reorderbuffer.h +++ b/src/include/replication/reorderbuffer.h @@ -276,30 +276,30 @@ typedef struct ReorderBuffer ReorderBuffer; /* change callback signature */ typedef void (*ReorderBufferApplyChangeCB) ( - ReorderBuffer *rb, - ReorderBufferTXN *txn, - Relation relation, - ReorderBufferChange *change); + ReorderBuffer *rb, + ReorderBufferTXN *txn, + Relation relation, + ReorderBufferChange *change); /* begin callback signature */ typedef void (*ReorderBufferBeginCB) ( - ReorderBuffer *rb, - ReorderBufferTXN *txn); + ReorderBuffer *rb, + ReorderBufferTXN *txn); /* commit callback signature */ typedef void (*ReorderBufferCommitCB) ( - ReorderBuffer *rb, - ReorderBufferTXN *txn, - XLogRecPtr commit_lsn); + ReorderBuffer *rb, + ReorderBufferTXN *txn, + XLogRecPtr commit_lsn); /* message callback signature */ typedef void (*ReorderBufferMessageCB) ( - ReorderBuffer *rb, - ReorderBufferTXN *txn, - XLogRecPtr message_lsn, - bool transactional, - const char *prefix, Size sz, - const char *message); + ReorderBuffer *rb, + ReorderBufferTXN *txn, + XLogRecPtr message_lsn, + bool transactional, + const char *prefix, Size sz, + const char *message); struct ReorderBuffer { diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h index 31d090c99d9..68a813895b6 100644 --- a/src/include/replication/walreceiver.h +++ b/src/include/replication/walreceiver.h @@ -192,33 +192,33 @@ typedef struct WalRcvExecResult /* libpqwalreceiver hooks */ typedef WalReceiverConn *(*walrcv_connect_fn) (const char *conninfo, bool logical, - const char *appname, - char **err); + const char *appname, + char **err); typedef void (*walrcv_check_conninfo_fn) (const char *conninfo); typedef char *(*walrcv_get_conninfo_fn) (WalReceiverConn *conn); typedef char *(*walrcv_identify_system_fn) (WalReceiverConn *conn, - TimeLineID *primary_tli, - int *server_version); + TimeLineID *primary_tli, + int *server_version); typedef void (*walrcv_readtimelinehistoryfile_fn) (WalReceiverConn *conn, - TimeLineID tli, - char **filename, - char **content, int *size); + TimeLineID tli, + char **filename, + char **content, int *size); typedef bool (*walrcv_startstreaming_fn) (WalReceiverConn *conn, - const WalRcvStreamOptions *options); + const WalRcvStreamOptions *options); typedef void (*walrcv_endstreaming_fn) (WalReceiverConn *conn, - TimeLineID *next_tli); + TimeLineID *next_tli); typedef int (*walrcv_receive_fn) (WalReceiverConn *conn, char **buffer, - pgsocket *wait_fd); + pgsocket *wait_fd); typedef void (*walrcv_send_fn) (WalReceiverConn *conn, const char *buffer, - int nbytes); + int nbytes); typedef char *(*walrcv_create_slot_fn) (WalReceiverConn *conn, const char *slotname, bool temporary, - CRSSnapshotAction snapshot_action, - XLogRecPtr *lsn); + CRSSnapshotAction snapshot_action, + XLogRecPtr *lsn); typedef WalRcvExecResult *(*walrcv_exec_fn) (WalReceiverConn *conn, - const char *query, - const int nRetTypes, - const Oid *retTypes); + const char *query, + const int nRetTypes, + const Oid *retTypes); typedef void (*walrcv_disconnect_fn) (WalReceiverConn *conn); typedef struct WalReceiverFunctionsType diff --git a/src/include/rewrite/rowsecurity.h b/src/include/rewrite/rowsecurity.h index 0e739fd3344..260a79c3d28 100644 --- a/src/include/rewrite/rowsecurity.h +++ b/src/include/rewrite/rowsecurity.h @@ -35,7 +35,7 @@ typedef struct RowSecurityDesc } RowSecurityDesc; typedef List *(*row_security_policy_hook_type) (CmdType cmdtype, - Relation relation); + Relation relation); extern PGDLLIMPORT row_security_policy_hook_type row_security_policy_hook_permissive; diff --git a/src/include/rusagestub.h b/src/include/rusagestub.h index 0e366cab10f..9027b89bf04 100644 --- a/src/include/rusagestub.h +++ b/src/include/rusagestub.h @@ -29,6 +29,6 @@ struct rusage struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage *rusage); #endif /* RUSAGESTUB_H */ diff --git a/src/include/statistics/statistics.h b/src/include/statistics/statistics.h index 58e1a624b56..87bf3d82cab 100644 --- a/src/include/statistics/statistics.h +++ b/src/include/statistics/statistics.h @@ -28,6 +28,7 @@ typedef struct MVNDistinctItem double ndistinct; /* ndistinct value for this combination */ Bitmapset *attrs; /* attr numbers of items */ } MVNDistinctItem; + /* size of the struct, excluding attribute list */ #define SizeOfMVNDistinctItem \ (offsetof(MVNDistinctItem, ndistinct) + sizeof(double)) diff --git a/src/include/storage/itemptr.h b/src/include/storage/itemptr.h index c21d2adfcbf..74b2f3cbf20 100644 --- a/src/include/storage/itemptr.h +++ b/src/include/storage/itemptr.h @@ -38,6 +38,7 @@ typedef struct ItemPointerData BlockIdData ip_blkid; OffsetNumber ip_posid; } + /* If compiler understands packed and aligned pragmas, use those */ #if defined(pg_attribute_packed) && defined(pg_attribute_aligned) pg_attribute_packed() diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 7a9c1055194..ad257be9507 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -113,7 +113,7 @@ typedef struct LockMethodData { int numLockModes; const LOCKMASK *conflictTab; - const char *const * lockModeNames; + const char *const *lockModeNames; const bool *trace_flag; } LockMethodData; diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index 0cd45bb6d8e..c53488800c3 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -214,7 +214,7 @@ typedef enum BuiltinTrancheIds LWTRANCHE_PARALLEL_QUERY_DSA, LWTRANCHE_TBM, LWTRANCHE_FIRST_USER_DEFINED -} BuiltinTrancheIds; +} BuiltinTrancheIds; /* * Prior to PostgreSQL 9.4, we used an enum type called LWLockId to refer diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h index a329c81899e..7a76c087874 100644 --- a/src/include/storage/pg_shmem.h +++ b/src/include/storage/pg_shmem.h @@ -50,7 +50,7 @@ typedef enum HUGE_PAGES_OFF, HUGE_PAGES_ON, HUGE_PAGES_TRY -} HugePagesType; +} HugePagesType; #ifndef WIN32 extern unsigned long UsedShmemSegID; diff --git a/src/include/storage/predicate_internals.h b/src/include/storage/predicate_internals.h index 3cb0ab9bb0d..48e6471ddca 100644 --- a/src/include/storage/predicate_internals.h +++ b/src/include/storage/predicate_internals.h @@ -135,7 +135,7 @@ typedef struct PredXactListElementData { SHM_QUEUE link; SERIALIZABLEXACT sxact; -} PredXactListElementData; +} PredXactListElementData; typedef struct PredXactListElementData *PredXactListElement; @@ -174,7 +174,7 @@ typedef struct PredXactListData SERIALIZABLEXACT *OldCommittedSxact; /* shared copy of dummy sxact */ PredXactListElement element; -} PredXactListData; +} PredXactListData; typedef struct PredXactListData *PredXactList; @@ -198,7 +198,7 @@ typedef struct RWConflictData SHM_QUEUE inLink; /* link for list of conflicts in to a sxact */ SERIALIZABLEXACT *sxactOut; SERIALIZABLEXACT *sxactIn; -} RWConflictData; +} RWConflictData; typedef struct RWConflictData *RWConflict; @@ -209,7 +209,7 @@ typedef struct RWConflictPoolHeaderData { SHM_QUEUE availableList; RWConflict element; -} RWConflictPoolHeaderData; +} RWConflictPoolHeaderData; typedef struct RWConflictPoolHeaderData *RWConflictPoolHeader; diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h index c459af2e139..a11cd92c014 100644 --- a/src/include/tcop/dest.h +++ b/src/include/tcop/dest.h @@ -116,11 +116,11 @@ struct _DestReceiver { /* Called for each tuple to be output: */ bool (*receiveSlot) (TupleTableSlot *slot, - DestReceiver *self); + DestReceiver *self); /* Per-executor-run initialization and shutdown: */ void (*rStartup) (DestReceiver *self, - int operation, - TupleDesc typeinfo); + int operation, + TupleDesc typeinfo); void (*rShutdown) (DestReceiver *self); /* Destroy the receiver object itself (if dynamically allocated) */ void (*rDestroy) (DestReceiver *self); diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h index 14f65c34d66..850d09b9f04 100644 --- a/src/include/tcop/utility.h +++ b/src/include/tcop/utility.h @@ -26,8 +26,8 @@ typedef enum /* Hook for plugins to get control in ProcessUtility() */ typedef void (*ProcessUtility_hook_type) (PlannedStmt *pstmt, const char *queryString, ProcessUtilityContext context, - ParamListInfo params, - QueryEnvironment *queryEnv, + ParamListInfo params, + QueryEnvironment *queryEnv, DestReceiver *dest, char *completionTag); extern PGDLLIMPORT ProcessUtility_hook_type ProcessUtility_hook; diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h index 20d90b12fd1..f44f683f278 100644 --- a/src/include/tsearch/ts_utils.h +++ b/src/include/tsearch/ts_utils.h @@ -41,11 +41,11 @@ struct TSQueryParserStateData; /* private in backend/utils/adt/tsquery.c */ typedef struct TSQueryParserStateData *TSQueryParserState; typedef void (*PushFunction) (Datum opaque, TSQueryParserState state, - char *token, int tokenlen, - int16 tokenweights, /* bitmap as described - * in QueryOperand - * struct */ - bool prefix); + char *token, int tokenlen, + int16 tokenweights, /* bitmap as described + * in QueryOperand + * struct */ + bool prefix); extern TSQuery parse_tsquery(char *buf, PushFunction pushval, @@ -152,7 +152,7 @@ typedef struct ExecPhraseData * it as zeroes if position data is not available. */ typedef bool (*TSExecuteCallback) (void *arg, QueryOperand *val, - ExecPhraseData *data); + ExecPhraseData *data); /* * Flag bits for TS_execute diff --git a/src/include/utils/bytea.h b/src/include/utils/bytea.h index 818e65707fd..0cc54383283 100644 --- a/src/include/utils/bytea.h +++ b/src/include/utils/bytea.h @@ -21,7 +21,7 @@ typedef enum { BYTEA_OUTPUT_ESCAPE, BYTEA_OUTPUT_HEX -} ByteaOutputType; +} ByteaOutputType; extern int bytea_output; /* ByteaOutputType, but int for GUC enum */ diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index fb7885bf342..15b558c6399 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -286,8 +286,8 @@ extern const int day_tab[2][13]; #define DTERR_TZDISP_OVERFLOW (-5) -extern void GetCurrentDateTime(struct pg_tm * tm); -extern void GetCurrentTimeUsec(struct pg_tm * tm, fsec_t *fsec, int *tzp); +extern void GetCurrentDateTime(struct pg_tm *tm); +extern void GetCurrentTimeUsec(struct pg_tm *tm, fsec_t *fsec, int *tzp); extern void j2date(int jd, int *year, int *month, int *day); extern int date2j(int year, int month, int day); @@ -296,32 +296,32 @@ extern int ParseDateTime(const char *timestr, char *workbuf, size_t buflen, int maxfields, int *numfields); extern int DecodeDateTime(char **field, int *ftype, int nf, int *dtype, - struct pg_tm * tm, fsec_t *fsec, int *tzp); + struct pg_tm *tm, fsec_t *fsec, int *tzp); extern int DecodeTimezone(char *str, int *tzp); extern int DecodeTimeOnly(char **field, int *ftype, int nf, int *dtype, - struct pg_tm * tm, fsec_t *fsec, int *tzp); + struct pg_tm *tm, fsec_t *fsec, int *tzp); extern int DecodeInterval(char **field, int *ftype, int nf, int range, - int *dtype, struct pg_tm * tm, fsec_t *fsec); + int *dtype, struct pg_tm *tm, fsec_t *fsec); extern int DecodeISO8601Interval(char *str, - int *dtype, struct pg_tm * tm, fsec_t *fsec); + int *dtype, struct pg_tm *tm, fsec_t *fsec); extern void DateTimeParseError(int dterr, const char *str, const char *datatype) pg_attribute_noreturn(); -extern int DetermineTimeZoneOffset(struct pg_tm * tm, pg_tz *tzp); -extern int DetermineTimeZoneAbbrevOffset(struct pg_tm * tm, const char *abbr, pg_tz *tzp); +extern int DetermineTimeZoneOffset(struct pg_tm *tm, pg_tz *tzp); +extern int DetermineTimeZoneAbbrevOffset(struct pg_tm *tm, const char *abbr, pg_tz *tzp); extern int DetermineTimeZoneAbbrevOffsetTS(TimestampTz ts, const char *abbr, pg_tz *tzp, int *isdst); -extern void EncodeDateOnly(struct pg_tm * tm, int style, char *str); -extern void EncodeTimeOnly(struct pg_tm * tm, fsec_t fsec, bool print_tz, int tz, int style, char *str); -extern void EncodeDateTime(struct pg_tm * tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str); -extern void EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str); +extern void EncodeDateOnly(struct pg_tm *tm, int style, char *str); +extern void EncodeTimeOnly(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, int style, char *str); +extern void EncodeDateTime(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str); +extern void EncodeInterval(struct pg_tm *tm, fsec_t fsec, int style, char *str); extern void EncodeSpecialTimestamp(Timestamp dt, char *str); extern int ValidateDate(int fmask, bool isjulian, bool is2digits, bool bc, - struct pg_tm * tm); + struct pg_tm *tm); extern int DecodeTimezoneAbbrev(int field, char *lowtoken, int *offset, pg_tz **tz); diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index 9b469b9bfc9..58dc92ee5d3 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -382,7 +382,7 @@ typedef enum PGERROR_TERSE, /* single-line error messages */ PGERROR_DEFAULT, /* recommended style */ PGERROR_VERBOSE /* all the facts, ma'am */ -} PGErrorVerbosity; +} PGErrorVerbosity; extern int Log_error_verbosity; extern char *Log_line_prefix; diff --git a/src/include/utils/expandeddatum.h b/src/include/utils/expandeddatum.h index f853a13e6e4..d9b598591a2 100644 --- a/src/include/utils/expandeddatum.h +++ b/src/include/utils/expandeddatum.h @@ -66,7 +66,7 @@ */ typedef Size (*EOM_get_flat_size_method) (ExpandedObjectHeader *eohptr); typedef void (*EOM_flatten_into_method) (ExpandedObjectHeader *eohptr, - void *result, Size allocated_size); + void *result, Size allocated_size); /* Struct of function pointers for an expanded object's methods */ typedef struct ExpandedObjectMethods diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 87d07410845..ea11c837003 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -335,7 +335,7 @@ extern void DefineCustomEnumVariable( const char *long_desc, int *valueAddr, int bootValue, - const struct config_enum_entry * options, + const struct config_enum_entry *options, GucContext context, int flags, GucEnumCheckHook check_hook, diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index 91c6000ec6a..f28578b3351 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -261,8 +261,8 @@ extern struct config_generic **get_guc_variables(void); extern void build_guc_variables(void); /* search in enum options */ -extern const char *config_enum_lookup_by_value(struct config_enum * record, int val); -extern bool config_enum_lookup_by_name(struct config_enum * record, +extern const char *config_enum_lookup_by_value(struct config_enum *record, int val); +extern bool config_enum_lookup_by_name(struct config_enum *record, const char *value, int *retval); #endif /* GUC_TABLES_H */ diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index 79640871613..9b4bd7c02b1 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -27,7 +27,7 @@ typedef uint32 (*HashValueFunc) (const void *key, Size keysize); * as key comparison functions.) */ typedef int (*HashCompareFunc) (const void *key1, const void *key2, - Size keysize); + Size keysize); /* * Key copying functions must have this signature. The return value is not diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h index 4b0706a3168..994b197af07 100644 --- a/src/include/utils/nabstime.h +++ b/src/include/utils/nabstime.h @@ -98,6 +98,6 @@ typedef TimeIntervalData *TimeInterval; /* non-fmgr-callable support routines */ extern AbsoluteTime GetCurrentAbsoluteTime(void); -extern void abstime2tm(AbsoluteTime time, int *tzp, struct pg_tm * tm, char **tzn); +extern void abstime2tm(AbsoluteTime time, int *tzp, struct pg_tm *tm, char **tzn); #endif /* NABSTIME_H */ diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index ef3898c98cb..887e5990326 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -190,7 +190,7 @@ typedef struct PortalData /* Presentation data, primarily used by the pg_cursors system view */ TimestampTz creation_time; /* time at which this portal was defined */ bool visible; /* include this portal in pg_cursors? */ -} PortalData; +} PortalData; /* * PortalIsValid diff --git a/src/include/utils/rangetypes.h b/src/include/utils/rangetypes.h index abb2223ec5e..fcc014adc27 100644 --- a/src/include/utils/rangetypes.h +++ b/src/include/utils/rangetypes.h @@ -40,8 +40,8 @@ typedef struct #define RANGE_UB_INF 0x10 /* upper bound is +infinity */ #define RANGE_LB_NULL 0x20 /* lower bound is null (NOT USED) */ #define RANGE_UB_NULL 0x40 /* upper bound is null (NOT USED) */ -#define RANGE_CONTAIN_EMPTY 0x80/* marks a GiST internal-page entry whose - * subtree contains some empty ranges */ +#define RANGE_CONTAIN_EMPTY 0x80 /* marks a GiST internal-page entry whose + * subtree contains some empty ranges */ #define RANGE_HAS_LBOUND(flags) (!((flags) & (RANGE_EMPTY | \ RANGE_LB_NULL | \ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 84768969d32..895232e16e1 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -72,7 +72,7 @@ typedef struct PartitionKeyData bool *parttypbyval; char *parttypalign; Oid *parttypcoll; -} PartitionKeyData; +} PartitionKeyData; typedef struct PartitionKeyData *PartitionKey; diff --git a/src/include/utils/resowner.h b/src/include/utils/resowner.h index ff785e3a3e1..bd9adb71d17 100644 --- a/src/include/utils/resowner.h +++ b/src/include/utils/resowner.h @@ -54,9 +54,9 @@ typedef enum * by providing a callback of this form. */ typedef void (*ResourceReleaseCallback) (ResourceReleasePhase phase, - bool isCommit, - bool isTopLevel, - void *arg); + bool isCommit, + bool isTopLevel, + void *arg); /* diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index 958bdba4552..d89a6e0e909 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -140,14 +140,14 @@ typedef struct /* Hooks for plugins to get control when we ask for stats */ typedef bool (*get_relation_stats_hook_type) (PlannerInfo *root, - RangeTblEntry *rte, - AttrNumber attnum, - VariableStatData *vardata); + RangeTblEntry *rte, + AttrNumber attnum, + VariableStatData *vardata); extern PGDLLIMPORT get_relation_stats_hook_type get_relation_stats_hook; typedef bool (*get_index_stats_hook_type) (PlannerInfo *root, - Oid indexOid, - AttrNumber indexattnum, - VariableStatData *vardata); + Oid indexOid, + AttrNumber indexattnum, + VariableStatData *vardata); extern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook; /* Functions in selfuncs.c */ diff --git a/src/include/utils/snapshot.h b/src/include/utils/snapshot.h index 2bcaa42277e..d996049d11c 100644 --- a/src/include/utils/snapshot.h +++ b/src/include/utils/snapshot.h @@ -31,7 +31,7 @@ typedef struct SnapshotData *Snapshot; * function. */ typedef bool (*SnapshotSatisfiesFunc) (HeapTuple htup, - Snapshot snapshot, Buffer buffer); + Snapshot snapshot, Buffer buffer); /* * Struct representing all kind of possible snapshots. diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 7fd1c7692ff..c15850445e4 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -81,16 +81,16 @@ extern pg_time_t timestamptz_to_time_t(TimestampTz t); extern const char *timestamptz_to_str(TimestampTz t); -extern int tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *dt); -extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm * tm, +extern int tm2timestamp(struct pg_tm *tm, fsec_t fsec, int *tzp, Timestamp *dt); +extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, const char **tzn, pg_tz *attimezone); extern void dt2time(Timestamp dt, int *hour, int *min, int *sec, fsec_t *fsec); -extern int interval2tm(Interval span, struct pg_tm * tm, fsec_t *fsec); -extern int tm2interval(struct pg_tm * tm, fsec_t fsec, Interval *span); +extern int interval2tm(Interval span, struct pg_tm *tm, fsec_t *fsec); +extern int tm2interval(struct pg_tm *tm, fsec_t fsec, Interval *span); extern Timestamp SetEpochTimestamp(void); -extern void GetEpochTime(struct pg_tm * tm); +extern void GetEpochTime(struct pg_tm *tm); extern int timestamp_cmp_internal(Timestamp dt1, Timestamp dt2); diff --git a/src/include/utils/xml.h b/src/include/utils/xml.h index 195b9b3a97a..fd3a3fba015 100644 --- a/src/include/utils/xml.h +++ b/src/include/utils/xml.h @@ -28,13 +28,13 @@ typedef enum XML_STANDALONE_NO, XML_STANDALONE_NO_VALUE, XML_STANDALONE_OMITTED -} XmlStandaloneType; +} XmlStandaloneType; typedef enum { XMLBINARY_BASE64, XMLBINARY_HEX -} XmlBinaryType; +} XmlBinaryType; typedef enum { |
