1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-29 22:49:41 +03:00

Post-feature-freeze pgindent run.

Discussion: https://postgr.es/m/15719.1523984266@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2018-04-26 14:47:16 -04:00
parent f83bf385c1
commit bdf46af748
167 changed files with 1174 additions and 1061 deletions

View File

@@ -104,7 +104,7 @@ extern OffsetNumber gintuple_get_attrnum(GinState *ginstate, IndexTuple tuple);
extern Datum gintuple_get_key(GinState *ginstate, IndexTuple tuple,
GinNullCategory *category);
extern void GinCheckForSerializableConflictIn(Relation relation,
HeapTuple tuple, Buffer buffer);
HeapTuple tuple, Buffer buffer);
/* gininsert.c */
extern IndexBuildResult *ginbuild(Relation heap, Relation index,

View File

@@ -126,7 +126,7 @@ typedef struct xl_heap_truncate
Oid dbId;
uint32 nrelids;
uint8 flags;
Oid relids[FLEXIBLE_ARRAY_MEMBER];
Oid relids[FLEXIBLE_ARRAY_MEMBER];
} xl_heap_truncate;
#define SizeOfHeapTruncate (offsetof(xl_heap_truncate, relids))

View File

@@ -103,10 +103,10 @@ typedef struct BTMetaPageData
BlockNumber btm_fastroot; /* current "fast" root location */
uint32 btm_fastlevel; /* tree level of the "fast" root page */
/* following fields are available since page version 3 */
TransactionId btm_oldest_btpo_xact; /* oldest btpo_xact among of
* deleted pages */
float8 btm_last_cleanup_num_heap_tuples; /* number of heap tuples
* during last cleanup */
TransactionId btm_oldest_btpo_xact; /* oldest btpo_xact among of deleted
* pages */
float8 btm_last_cleanup_num_heap_tuples; /* number of heap tuples
* during last cleanup */
} BTMetaPageData;
#define BTPageGetMeta(p) \
@@ -115,7 +115,7 @@ typedef struct BTMetaPageData
#define BTREE_METAPAGE 0 /* first page is meta */
#define BTREE_MAGIC 0x053162 /* magic number of btree pages */
#define BTREE_VERSION 3 /* current version number */
#define BTREE_MIN_VERSION 2 /* minimal supported version number */
#define BTREE_MIN_VERSION 2 /* minimal supported version number */
/*
* Maximum size of a btree index entry, including its tuple header.
@@ -537,7 +537,7 @@ extern void _bt_finish_split(Relation rel, Buffer bbuf, BTStack stack);
*/
extern void _bt_initmetapage(Page page, BlockNumber rootbknum, uint32 level);
extern void _bt_update_meta_cleanup_info(Relation rel,
TransactionId oldestBtpoXact, float8 numHeapTuples);
TransactionId oldestBtpoXact, float8 numHeapTuples);
extern void _bt_upgrademetapage(Page page);
extern Buffer _bt_getroot(Relation rel, int access);
extern Buffer _bt_gettrueroot(Relation rel);

View File

@@ -51,7 +51,7 @@ typedef enum relopt_kind
RELOPT_KIND_PARTITIONED = (1 << 11),
/* if you add a new kind, make sure you update "last_default" too */
RELOPT_KIND_LAST_DEFAULT = RELOPT_KIND_PARTITIONED,
RELOPT_KIND_INDEX = RELOPT_KIND_BTREE|RELOPT_KIND_HASH|RELOPT_KIND_GIN|RELOPT_KIND_SPGIST,
RELOPT_KIND_INDEX = RELOPT_KIND_BTREE | RELOPT_KIND_HASH | RELOPT_KIND_GIN | RELOPT_KIND_SPGIST,
/* some compilers treat enums as signed ints, so we can't use 1 << 31 */
RELOPT_KIND_MAX = (1 << 30)
} relopt_kind;

View File

@@ -41,7 +41,7 @@ typedef struct ParallelHeapScanDescData
* workers so far. */
bool phs_snapshot_any; /* SnapshotAny, not phs_snapshot_data? */
char phs_snapshot_data[FLEXIBLE_ARRAY_MEMBER];
} ParallelHeapScanDescData;
} ParallelHeapScanDescData;
typedef struct HeapScanDescData
{

View File

@@ -120,7 +120,7 @@ typedef struct SpGistState
spgConfigOut config; /* filled in by opclass config method */
SpGistTypeDesc attType; /* type of values to be indexed/restored */
SpGistTypeDesc attLeafType; /* type of leaf-tuple values */
SpGistTypeDesc attLeafType; /* type of leaf-tuple values */
SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */
SpGistTypeDesc attLabelType; /* type of node label values */
@@ -181,7 +181,7 @@ typedef struct SpGistCache
spgConfigOut config; /* filled in by opclass config method */
SpGistTypeDesc attType; /* type of values to be indexed/restored */
SpGistTypeDesc attLeafType; /* type of leaf-tuple values */
SpGistTypeDesc attLeafType; /* type of leaf-tuple values */
SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */
SpGistTypeDesc attLabelType; /* type of node label values */

View File

@@ -48,7 +48,7 @@ extern bool StandbyTransactionIdIsPrepared(TransactionId xid);
extern TransactionId PrescanPreparedTransactions(TransactionId **xids_p,
int *nxids_p);
extern void ParsePrepareRecord(uint8 info, char *xlrec,
xl_xact_parsed_prepare *parsed);
xl_xact_parsed_prepare *parsed);
extern void StandbyRecoverPreparedTransactions(void);
extern void RecoverPreparedTransactions(void);

View File

@@ -312,7 +312,7 @@ typedef struct xl_xact_parsed_commit
SharedInvalidationMessage *msgs;
TransactionId twophase_xid; /* only for 2PC */
char twophase_gid[GIDSIZE]; /* only for 2PC */
char twophase_gid[GIDSIZE]; /* only for 2PC */
int nabortrels; /* only for 2PC */
RelFileNode *abortnodes; /* only for 2PC */
@@ -337,7 +337,7 @@ typedef struct xl_xact_parsed_abort
RelFileNode *xnodes;
TransactionId twophase_xid; /* only for 2PC */
char twophase_gid[GIDSIZE]; /* only for 2PC */
char twophase_gid[GIDSIZE]; /* only for 2PC */
XLogRecPtr origin_lsn;
TimestampTz origin_timestamp;

View File

@@ -67,7 +67,8 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat
bool relispopulated; /* matview currently holds query results */
char relreplident; /* see REPLICA_IDENTITY_xxx constants */
bool relispartition; /* is relation a partition? */
Oid relrewrite; /* heap for rewrite during DDL, link to original rel */
Oid relrewrite; /* heap for rewrite during DDL, link to
* original rel */
TransactionId relfrozenxid; /* all Xids < this are frozen in this rel */
TransactionId relminmxid; /* all multixacts in this rel are >= this.
* this is really a MultiXactId */

View File

@@ -54,7 +54,7 @@ extern void CheckTableNotInUse(Relation rel, const char *stmt);
extern void ExecuteTruncate(TruncateStmt *stmt);
extern void ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
DropBehavior behavior, bool restart_seqs);
DropBehavior behavior, bool restart_seqs);
extern void SetRelationHasSubclass(Oid relationId, bool relhassubclass);

View File

@@ -35,7 +35,7 @@ pg_add_s16_overflow(int16 a, int16 b, int16 *result)
if (res > PG_INT16_MAX || res < PG_INT16_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int16) res;
@@ -58,7 +58,7 @@ pg_sub_s16_overflow(int16 a, int16 b, int16 *result)
if (res > PG_INT16_MAX || res < PG_INT16_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int16) res;
@@ -81,7 +81,7 @@ pg_mul_s16_overflow(int16 a, int16 b, int16 *result)
if (res > PG_INT16_MAX || res < PG_INT16_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int16) res;
@@ -104,7 +104,7 @@ pg_add_s32_overflow(int32 a, int32 b, int32 *result)
if (res > PG_INT32_MAX || res < PG_INT32_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int32) res;
@@ -127,7 +127,7 @@ pg_sub_s32_overflow(int32 a, int32 b, int32 *result)
if (res > PG_INT32_MAX || res < PG_INT32_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int32) res;
@@ -150,7 +150,7 @@ pg_mul_s32_overflow(int32 a, int32 b, int32 *result)
if (res > PG_INT32_MAX || res < PG_INT32_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int32) res;
@@ -173,7 +173,7 @@ pg_add_s64_overflow(int64 a, int64 b, int64 *result)
if (res > PG_INT64_MAX || res < PG_INT64_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int64) res;
@@ -182,7 +182,7 @@ pg_add_s64_overflow(int64 a, int64 b, int64 *result)
if ((a > 0 && b > 0 && a > PG_INT64_MAX - b) ||
(a < 0 && b < 0 && a < PG_INT64_MIN - b))
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = a + b;
@@ -205,7 +205,7 @@ pg_sub_s64_overflow(int64 a, int64 b, int64 *result)
if (res > PG_INT64_MAX || res < PG_INT64_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int64) res;
@@ -214,7 +214,7 @@ pg_sub_s64_overflow(int64 a, int64 b, int64 *result)
if ((a < 0 && b > 0 && a < PG_INT64_MIN + b) ||
(a > 0 && b < 0 && a > PG_INT64_MAX + b))
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = a - b;
@@ -237,7 +237,7 @@ pg_mul_s64_overflow(int64 a, int64 b, int64 *result)
if (res > PG_INT64_MAX || res < PG_INT64_MIN)
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = (int64) res;
@@ -262,7 +262,7 @@ pg_mul_s64_overflow(int64 a, int64 b, int64 *result)
(a < 0 && b > 0 && a < PG_INT64_MIN / b) ||
(a < 0 && b < 0 && a < PG_INT64_MAX / b)))
{
*result = 0x5EED; /* to avoid spurious warnings */
*result = 0x5EED; /* to avoid spurious warnings */
return true;
}
*result = a * b;

View File

@@ -17,7 +17,7 @@
/* Name of SCRAM mechanisms per IANA */
#define SCRAM_SHA_256_NAME "SCRAM-SHA-256"
#define SCRAM_SHA_256_PLUS_NAME "SCRAM-SHA-256-PLUS" /* with channel binding */
#define SCRAM_SHA_256_PLUS_NAME "SCRAM-SHA-256-PLUS" /* with channel binding */
/* Channel binding types */
#define SCRAM_CHANNEL_BINDING_TLS_UNIQUE "tls-unique"

View File

@@ -12,6 +12,6 @@
extern bool pg_str_endswith(const char *str, const char *end);
extern int strtoint(const char *pg_restrict str, char **pg_restrict endptr,
int base);
int base);
#endif /* COMMON_STRING_H */

View File

@@ -692,9 +692,9 @@ extern void CheckExprStillValid(ExprState *state, ExprContext *econtext);
* expression evaluation, reducing code duplication.
*/
extern void ExecEvalFuncExprFusage(ExprState *state, ExprEvalStep *op,
ExprContext *econtext);
ExprContext *econtext);
extern void ExecEvalFuncExprStrictFusage(ExprState *state, ExprEvalStep *op,
ExprContext *econtext);
ExprContext *econtext);
extern void ExecEvalParamExec(ExprState *state, ExprEvalStep *op,
ExprContext *econtext);
extern void ExecEvalParamExecParams(Bitmapset *params, EState *estate);

View File

@@ -186,9 +186,9 @@ extern int ExecFindPartition(ResultRelInfo *resultRelInfo,
TupleTableSlot *slot,
EState *estate);
extern ResultRelInfo *ExecInitPartitionInfo(ModifyTableState *mtstate,
ResultRelInfo *resultRelInfo,
PartitionTupleRouting *proute,
EState *estate, int partidx);
ResultRelInfo *resultRelInfo,
PartitionTupleRouting *proute,
EState *estate, int partidx);
extern void ExecInitRoutingInfo(ModifyTableState *mtstate,
EState *estate,
PartitionTupleRouting *proute,
@@ -204,7 +204,7 @@ extern HeapTuple ConvertPartitionTupleSlot(TupleConversionMap *map,
extern void ExecCleanupTupleRouting(ModifyTableState *mtstate,
PartitionTupleRouting *proute);
extern PartitionPruneState *ExecSetupPartitionPruneState(PlanState *planstate,
List *partitionpruneinfo);
List *partitionpruneinfo);
extern Bitmapset *ExecFindMatchingSubPlans(PartitionPruneState *prunestate);
extern Bitmapset *ExecFindInitialMatchingSubPlans(PartitionPruneState *prunestate,
int nsubnodes);

View File

@@ -433,7 +433,7 @@ extern void ExecScanReScan(ScanState *node);
extern void ExecInitResultTupleSlotTL(EState *estate, PlanState *planstate);
extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupleDesc);
extern TupleTableSlot *ExecInitExtraTupleSlot(EState *estate,
TupleDesc tupleDesc);
TupleDesc tupleDesc);
extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate,
TupleDesc tupType);
extern TupleDesc ExecTypeFromTL(List *targetList, bool hasoid);

View File

@@ -59,8 +59,8 @@ typedef struct Instrumentation
double ntuples; /* Total tuples produced */
double ntuples2; /* Secondary node-specific tuple counter */
double nloops; /* # of run cycles for this node */
double nfiltered1; /* # tuples removed by scanqual or joinqual */
double nfiltered2; /* # tuples removed by "other" quals */
double nfiltered1; /* # tuples removed by scanqual or joinqual */
double nfiltered2; /* # tuples removed by "other" quals */
BufferUsage bufusage; /* Total buffer usage */
} Instrumentation;

View File

@@ -38,8 +38,10 @@ typedef struct
QueryEnvironment *queryEnv; /* query environment setup for SPI level */
/* transaction management support */
bool atomic; /* atomic execution context, does not allow transactions */
bool internal_xact; /* SPI-managed transaction boundary, skip cleanup */
bool atomic; /* atomic execution context, does not allow
* transactions */
bool internal_xact; /* SPI-managed transaction boundary, skip
* cleanup */
} _SPI_connection;
/*

View File

@@ -134,7 +134,7 @@ typedef struct TupleTableSlot
HeapTupleData tts_minhdr; /* workspace for minimal-tuple-only case */
#define FIELDNO_TUPLETABLESLOT_OFF 14
uint32 tts_off; /* saved state for slot_deform_tuple */
bool tts_fixedTupleDescriptor; /* descriptor can't be changed */
bool tts_fixedTupleDescriptor; /* descriptor can't be changed */
} TupleTableSlot;
#define TTS_HAS_PHYSICAL_TUPLE(slot) \

View File

@@ -75,7 +75,7 @@ extern ConditionalStack conditional_stack_create(void);
extern void conditional_stack_destroy(ConditionalStack cstack);
extern int conditional_stack_depth(ConditionalStack cstack);
extern int conditional_stack_depth(ConditionalStack cstack);
extern void conditional_stack_push(ConditionalStack cstack, ifState new_state);

View File

@@ -106,8 +106,8 @@ extern bool SSLPreferServerCiphers;
* prototypes for functions in be-secure-common.c
*/
extern int run_ssl_passphrase_command(const char *prompt, bool is_server_start,
char *buf, int size);
char *buf, int size);
extern bool check_ssl_key_file_permissions(const char *ssl_key_file,
bool isServerStart);
bool isServerStart);
#endif /* LIBPQ_H */

View File

@@ -502,8 +502,8 @@ typedef struct EState
int es_num_root_result_relations; /* length of the array */
/*
* The following list contains ResultRelInfos created by the tuple
* routing code for partitions that don't already have one.
* The following list contains ResultRelInfos created by the tuple routing
* code for partitions that don't already have one.
*/
List *es_tuple_routing_result_relations;
@@ -836,7 +836,8 @@ typedef struct SubPlanState
MemoryContext hashtempcxt; /* temp memory context for hash tables */
ExprContext *innerecontext; /* econtext for computing inner tuples */
AttrNumber *keyColIdx; /* control data for hash tables */
Oid *tab_eq_funcoids;/* equality func oids for table datatype(s) */
Oid *tab_eq_funcoids; /* equality func oids for table
* datatype(s) */
FmgrInfo *tab_hash_funcs; /* hash functions for table datatype(s) */
FmgrInfo *tab_eq_funcs; /* equality functions for table datatype(s) */
FmgrInfo *lhs_hash_funcs; /* hash functions for lefthand datatype(s) */
@@ -1087,8 +1088,8 @@ struct AppendState
PlanState **appendplans; /* array of PlanStates for my inputs */
int as_nplans;
int as_whichplan;
int as_first_partial_plan; /* Index of 'appendplans' containing
* the first partial plan */
int as_first_partial_plan; /* Index of 'appendplans' containing
* the first partial plan */
ParallelAppendState *as_pstate; /* parallel coordination info */
Size pstate_len; /* size of parallel coordination info */
struct PartitionPruneState *as_prune_state;
@@ -1958,8 +1959,8 @@ typedef struct WindowAggState
WindowStatePerFunc perfunc; /* per-window-function information */
WindowStatePerAgg peragg; /* per-plain-aggregate information */
ExprState *partEqfunction; /* equality funcs for partition columns */
ExprState *ordEqfunction; /* equality funcs for ordering columns */
ExprState *partEqfunction; /* equality funcs for partition columns */
ExprState *ordEqfunction; /* equality funcs for ordering columns */
Tuplestorestate *buffer; /* stores rows of current partition */
int current_ptr; /* read pointer # for current row */
int framehead_ptr; /* read pointer # for frame head, if used */
@@ -2037,7 +2038,7 @@ typedef struct WindowAggState
typedef struct UniqueState
{
PlanState ps; /* its first field is NodeTag */
ExprState *eqfunction; /* tuple equality qual */
ExprState *eqfunction; /* tuple equality qual */
} UniqueState;
/* ----------------

View File

@@ -655,8 +655,8 @@ typedef struct ColumnDef
Node *raw_default; /* default value (untransformed parse tree) */
Node *cooked_default; /* default value (transformed expr tree) */
char identity; /* attidentity setting */
RangeVar *identitySequence; /* to store identity sequence name for ALTER
* TABLE ... ADD COLUMN */
RangeVar *identitySequence; /* to store identity sequence name for
* ALTER TABLE ... ADD COLUMN */
CollateClause *collClause; /* untransformed COLLATE spec, if any */
Oid collOid; /* collation OID (InvalidOid if not set) */
List *constraints; /* other constraints on column */
@@ -2974,7 +2974,7 @@ typedef struct TransactionStmt
NodeTag type;
TransactionStmtKind kind; /* see above */
List *options; /* for BEGIN/START commands */
char *savepoint_name; /* for savepoint commands */
char *savepoint_name; /* for savepoint commands */
char *gid; /* for two-phase-commit related commands */
} TransactionStmt;

View File

@@ -309,9 +309,9 @@ typedef struct PlannerInfo
Index qual_security_level; /* minimum security_level for quals */
/* Note: qual_security_level is zero if there are no securityQuals */
InheritanceKind inhTargetKind; /* indicates if the target relation is an
* inheritance child or partition or a
* partitioned table */
InheritanceKind inhTargetKind; /* indicates if the target relation is an
* inheritance child or partition or a
* partitioned table */
bool hasJoinRTEs; /* true if any RTEs are RTE_JOIN kind */
bool hasLateralRTEs; /* true if any RTEs are marked LATERAL */
bool hasDeletedRTEs; /* true if any RTE was deleted from jointree */

View File

@@ -54,7 +54,7 @@ extern PGDLLIMPORT double parallel_tuple_cost;
extern PGDLLIMPORT double parallel_setup_cost;
extern PGDLLIMPORT int effective_cache_size;
extern PGDLLIMPORT Cost disable_cost;
extern PGDLLIMPORT int max_parallel_workers_per_gather;
extern PGDLLIMPORT int max_parallel_workers_per_gather;
extern PGDLLIMPORT bool enable_seqscan;
extern PGDLLIMPORT bool enable_indexscan;
extern PGDLLIMPORT bool enable_indexonlyscan;
@@ -72,7 +72,7 @@ extern PGDLLIMPORT bool enable_partitionwise_aggregate;
extern PGDLLIMPORT bool enable_parallel_append;
extern PGDLLIMPORT bool enable_parallel_hash;
extern PGDLLIMPORT bool enable_partition_pruning;
extern PGDLLIMPORT int constraint_exclusion;
extern PGDLLIMPORT int constraint_exclusion;
extern double clamp_row_est(double nrows);
extern double index_pages_fetched(double tuples_fetched, BlockNumber pages,

View File

@@ -21,9 +21,9 @@
* allpaths.c
*/
extern PGDLLIMPORT bool enable_geqo;
extern PGDLLIMPORT int geqo_threshold;
extern PGDLLIMPORT int min_parallel_table_scan_size;
extern PGDLLIMPORT int min_parallel_index_scan_size;
extern PGDLLIMPORT int geqo_threshold;
extern PGDLLIMPORT int min_parallel_table_scan_size;
extern PGDLLIMPORT 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,
@@ -60,7 +60,7 @@ extern int compute_parallel_worker(RelOptInfo *rel, double heap_pages,
extern void create_partial_bitmap_paths(PlannerInfo *root, RelOptInfo *rel,
Path *bitmapqual);
extern void generate_partitionwise_join_paths(PlannerInfo *root,
RelOptInfo *rel);
RelOptInfo *rel);
#ifdef OPTIMIZER_DEBUG
extern void debug_print_rel(PlannerInfo *root, RelOptInfo *rel);

View File

@@ -32,8 +32,8 @@ typedef enum
extern Node *ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
Node *last_srf, FuncCall *fn, bool proc_call,
int location);
Node *last_srf, FuncCall *fn, bool proc_call,
int location);
extern FuncDetailCode func_get_detail(List *funcname,
List *fargs, List *fargnames,

View File

@@ -46,11 +46,11 @@ typedef struct LogicalDecodingContext
struct SnapBuild *snapshot_builder;
/*
* Marks the logical decoding context as fast forward decoding one.
* Such a context does not have plugin loaded so most of the the following
* Marks the logical decoding context as fast forward decoding one. Such a
* context does not have plugin loaded so most of the the following
* properties are unused.
*/
bool fast_forward;
bool fast_forward;
OutputPluginCallbacks callbacks;
OutputPluginOptions options;

View File

@@ -98,9 +98,9 @@ extern void logicalrep_write_delete(StringInfo out, Relation rel,
extern LogicalRepRelId logicalrep_read_delete(StringInfo in,
LogicalRepTupleData *oldtup);
extern void logicalrep_write_truncate(StringInfo out, int nrelids, Oid relids[],
bool cascade, bool restart_seqs);
bool cascade, bool restart_seqs);
extern List *logicalrep_read_truncate(StringInfo in,
bool *cascade, bool *restart_seqs);
bool *cascade, bool *restart_seqs);
extern void logicalrep_write_rel(StringInfo out, Relation rel);
extern LogicalRepRelation *logicalrep_read_rel(StringInfo in);
extern void logicalrep_write_typ(StringInfo out, Oid typoid);

View File

@@ -101,8 +101,8 @@ typedef struct ReorderBufferChange
} tp;
/*
* Truncate data for REORDER_BUFFER_CHANGE_TRUNCATE representing
* one set of relations to be truncated.
* Truncate data for REORDER_BUFFER_CHANGE_TRUNCATE representing one
* set of relations to be truncated.
*/
struct
{
@@ -110,7 +110,7 @@ typedef struct ReorderBufferChange
bool cascade;
bool restart_seqs;
Oid *relids;
} truncate;
} truncate;
/* Message with arbitrary data. */
struct

View File

@@ -110,8 +110,8 @@ typedef struct
char conninfo[MAXCONNINFO];
/*
* Host name (this can be a host name, an IP address, or a directory
* path) and port number of the active replication connection.
* Host name (this can be a host name, an IP address, or a directory path)
* and port number of the active replication connection.
*/
char sender_host[NI_MAXHOST];
int sender_port;
@@ -206,8 +206,8 @@ typedef WalReceiverConn *(*walrcv_connect_fn) (const char *conninfo, bool logica
typedef void (*walrcv_check_conninfo_fn) (const char *conninfo);
typedef char *(*walrcv_get_conninfo_fn) (WalReceiverConn *conn);
typedef void (*walrcv_get_senderinfo_fn) (WalReceiverConn *conn,
char **sender_host,
int *sender_port);
char **sender_host,
int *sender_port);
typedef char *(*walrcv_identify_system_fn) (WalReceiverConn *conn,
TimeLineID *primary_tli,
int *server_version);

View File

@@ -20,7 +20,7 @@
extern void ResetUnloggedRelations(int op);
extern bool parse_filename_for_nontemp_relation(const char *name,
int *oidchars, ForkNumber *fork);
int *oidchars, ForkNumber *fork);
#define UNLOGGED_RELATION_CLEANUP 0x0001
#define UNLOGGED_RELATION_INIT 0x0002

View File

@@ -20,7 +20,8 @@ typedef enum
{
PROCESS_UTILITY_TOPLEVEL, /* toplevel interactive command */
PROCESS_UTILITY_QUERY, /* a complete query, but not toplevel */
PROCESS_UTILITY_QUERY_NONATOMIC, /* a complete query, nonatomic execution context */
PROCESS_UTILITY_QUERY_NONATOMIC, /* a complete query, nonatomic
* execution context */
PROCESS_UTILITY_SUBCOMMAND /* a portion of a query */
} ProcessUtilityContext;

View File

@@ -62,9 +62,9 @@ typedef void (*PushFunction) (Datum opaque, TSQueryParserState state,
#define P_TSQ_WEB (1 << 1)
extern TSQuery parse_tsquery(char *buf,
PushFunction pushval,
Datum opaque,
int flags);
PushFunction pushval,
Datum opaque,
int flags);
/* Functions for use by PushFunction implementations */
extern void pushValue(TSQueryParserState state,

View File

@@ -136,12 +136,13 @@ extern bool IsValidJsonNumber(const char *str, int len);
* Flag types for iterate_json(b)_values to specify what elements from a
* json(b) document we want to iterate.
*/
typedef enum JsonToIndex {
jtiKey = 0x01,
jtiString = 0x02,
jtiNumeric = 0x04,
jtiBool = 0x08,
jtiAll = jtiKey | jtiString | jtiNumeric | jtiBool
typedef enum JsonToIndex
{
jtiKey = 0x01,
jtiString = 0x02,
jtiNumeric = 0x04,
jtiBool = 0x08,
jtiAll = jtiKey | jtiString | jtiNumeric | jtiBool
} JsonToIndex;
/* an action that will be applied to each value in iterate_json(b)_vaues functions */
@@ -152,9 +153,9 @@ typedef text *(*JsonTransformStringValuesAction) (void *state, char *elem_value,
extern uint32 parse_jsonb_index_flags(Jsonb *jb);
extern void iterate_jsonb_values(Jsonb *jb, uint32 flags, void *state,
JsonIterateStringValuesAction action);
JsonIterateStringValuesAction action);
extern void iterate_json_values(text *json, uint32 flags, void *action_state,
JsonIterateStringValuesAction action);
JsonIterateStringValuesAction action);
extern Jsonb *transform_jsonb_string_values(Jsonb *jsonb, void *action_state,
JsonTransformStringValuesAction transform_action);
extern text *transform_json_string_values(text *json, void *action_state,

View File

@@ -44,7 +44,7 @@ typedef struct PartitionKeyData
bool *parttypbyval;
char *parttypalign;
Oid *parttypcoll;
} PartitionKeyData;
} PartitionKeyData;
extern void RelationBuildPartitionKey(Relation relation);
extern void RelationBuildPartitionDesc(Relation rel);

View File

@@ -116,7 +116,7 @@ typedef struct PortalData
/* Bookkeeping data */
const char *name; /* portal's name */
const char *prepStmtName; /* source prepared statement (NULL if none) */
MemoryContext portalContext;/* subsidiary memory for portal */
MemoryContext portalContext; /* subsidiary memory for portal */
ResourceOwner resowner; /* resources owned by portal */
void (*cleanup) (Portal portal); /* cleanup hook */

View File

@@ -116,7 +116,7 @@ typedef struct RelationData
Bitmapset *rd_keyattr; /* cols that can be ref'd by foreign keys */
Bitmapset *rd_pkattr; /* cols included in primary key */
Bitmapset *rd_idattr; /* included in replica identity index */
Bitmapset *rd_projidx; /* Oids of projection indexes */
Bitmapset *rd_projidx; /* Oids of projection indexes */
PublicationActions *rd_pubactions; /* publication actions */
@@ -223,7 +223,7 @@ typedef struct ForeignKeyCacheInfo
typedef struct GenericIndexOpts
{
int32 vl_len_;
bool recheck_on_update;
bool recheck_on_update;
} GenericIndexOpts;
/*

View File

@@ -91,8 +91,8 @@ extern void ResourceOwnerForgetDSM(ResourceOwner owner,
/* support for JITContext management */
extern void ResourceOwnerEnlargeJIT(ResourceOwner owner);
extern void ResourceOwnerRememberJIT(ResourceOwner owner,
Datum handle);
Datum handle);
extern void ResourceOwnerForgetJIT(ResourceOwner owner,
Datum handle);
Datum handle);
#endif /* RESOWNER_PRIVATE_H */

View File

@@ -54,7 +54,7 @@ typedef struct SortCoordinateData
/* Private opaque state (points to shared memory) */
Sharedsort *sharedsort;
} SortCoordinateData;
} SortCoordinateData;
typedef struct SortCoordinateData *SortCoordinate;