Add trailing commas to enum definitions

Since C99, there can be a trailing comma after the last value in an
enum definition.  A lot of new code has been introducing this style on
the fly.  Some new patches are now taking an inconsistent approach to
this.  Some add the last comma on the fly if they add a new last
value, some are trying to preserve the existing style in each place,
some are even dropping the last comma if there was one.  We could
nudge this all in a consistent direction if we just add the trailing
commas everywhere once.

I omitted a few places where there was a fixed "last" value that will
always stay last.  I also skipped the header files of libpq and ecpg,
in case people want to use those with older compilers.  There were
also a small number of cases where the enum type wasn't used anywhere
(but the enum values were), which ended up confusing pgindent a bit,
so I left those alone.

Discussion: https://www.postgresql.org/message-id/flat/386f8c45-c8ac-4681-8add-e3b0852c1620%40eisentraut.org
This commit is contained in:
Peter Eisentraut 2023-10-26 09:16:25 +02:00
parent f0efa5aec1
commit 611806cd72
212 changed files with 390 additions and 390 deletions

View File

@ -43,7 +43,7 @@ typedef enum XidBoundsViolation
XID_IN_FUTURE, XID_IN_FUTURE,
XID_PRECEDES_CLUSTERMIN, XID_PRECEDES_CLUSTERMIN,
XID_PRECEDES_RELMIN, XID_PRECEDES_RELMIN,
XID_BOUNDS_OK XID_BOUNDS_OK,
} XidBoundsViolation; } XidBoundsViolation;
typedef enum XidCommitStatus typedef enum XidCommitStatus
@ -51,14 +51,14 @@ typedef enum XidCommitStatus
XID_COMMITTED, XID_COMMITTED,
XID_IS_CURRENT_XID, XID_IS_CURRENT_XID,
XID_IN_PROGRESS, XID_IN_PROGRESS,
XID_ABORTED XID_ABORTED,
} XidCommitStatus; } XidCommitStatus;
typedef enum SkipPages typedef enum SkipPages
{ {
SKIP_PAGES_ALL_FROZEN, SKIP_PAGES_ALL_FROZEN,
SKIP_PAGES_ALL_VISIBLE, SKIP_PAGES_ALL_VISIBLE,
SKIP_PAGES_NONE SKIP_PAGES_NONE,
} SkipPages; } SkipPages;
/* /*

View File

@ -35,7 +35,7 @@ enum gbtree_type
gbt_t_bool, gbt_t_bool,
gbt_t_inet, gbt_t_inet,
gbt_t_uuid, gbt_t_uuid,
gbt_t_enum gbt_t_enum,
}; };
#endif #endif

View File

@ -33,7 +33,7 @@ typedef enum
{ {
PREWARM_PREFETCH, PREWARM_PREFETCH,
PREWARM_READ, PREWARM_READ,
PREWARM_BUFFER PREWARM_BUFFER,
} PrewarmType; } PrewarmType;
static PGIOAlignedBlock blockbuffer; static PGIOAlignedBlock blockbuffer;

View File

@ -118,7 +118,7 @@ typedef enum pgssVersion
PGSS_V1_8, PGSS_V1_8,
PGSS_V1_9, PGSS_V1_9,
PGSS_V1_10, PGSS_V1_10,
PGSS_V1_11 PGSS_V1_11,
} pgssVersion; } pgssVersion;
typedef enum pgssStoreKind typedef enum pgssStoreKind
@ -282,7 +282,7 @@ typedef enum
{ {
PGSS_TRACK_NONE, /* track no statements */ PGSS_TRACK_NONE, /* track no statements */
PGSS_TRACK_TOP, /* only top level statements */ PGSS_TRACK_TOP, /* only top level statements */
PGSS_TRACK_ALL /* all statements, including nested ones */ PGSS_TRACK_ALL, /* all statements, including nested ones */
} PGSSTrackLevel; } PGSSTrackLevel;
static const struct config_enum_entry track_options[] = static const struct config_enum_entry track_options[] =

View File

@ -29,7 +29,7 @@ PG_MODULE_MAGIC;
typedef enum HeapTupleForceOption typedef enum HeapTupleForceOption
{ {
HEAP_FORCE_KILL, HEAP_FORCE_KILL,
HEAP_FORCE_FREEZE HEAP_FORCE_FREEZE,
} HeapTupleForceOption; } HeapTupleForceOption;
PG_FUNCTION_INFO_V1(heap_force_kill); PG_FUNCTION_INFO_V1(heap_force_kill);

View File

@ -38,7 +38,7 @@ enum PGP_S2K_TYPE
{ {
PGP_S2K_SIMPLE = 0, PGP_S2K_SIMPLE = 0,
PGP_S2K_SALTED = 1, PGP_S2K_SALTED = 1,
PGP_S2K_ISALTED = 3 PGP_S2K_ISALTED = 3,
}; };
enum PGP_PKT_TYPE enum PGP_PKT_TYPE
@ -60,7 +60,7 @@ enum PGP_PKT_TYPE
PGP_PKT_USER_ATTR = 17, PGP_PKT_USER_ATTR = 17,
PGP_PKT_SYMENCRYPTED_DATA_MDC = 18, PGP_PKT_SYMENCRYPTED_DATA_MDC = 18,
PGP_PKT_MDC = 19, PGP_PKT_MDC = 19,
PGP_PKT_PRIV_61 = 61 /* occurs in gpg secring */ PGP_PKT_PRIV_61 = 61, /* occurs in gpg secring */
}; };
enum PGP_PUB_ALGO_TYPE enum PGP_PUB_ALGO_TYPE
@ -69,7 +69,7 @@ enum PGP_PUB_ALGO_TYPE
PGP_PUB_RSA_ENCRYPT = 2, PGP_PUB_RSA_ENCRYPT = 2,
PGP_PUB_RSA_SIGN = 3, PGP_PUB_RSA_SIGN = 3,
PGP_PUB_ELG_ENCRYPT = 16, PGP_PUB_ELG_ENCRYPT = 16,
PGP_PUB_DSA_SIGN = 17 PGP_PUB_DSA_SIGN = 17,
}; };
enum PGP_SYMENC_TYPE enum PGP_SYMENC_TYPE
@ -84,7 +84,7 @@ enum PGP_SYMENC_TYPE
PGP_SYM_AES_128 = 7, /* should */ PGP_SYM_AES_128 = 7, /* should */
PGP_SYM_AES_192 = 8, PGP_SYM_AES_192 = 8,
PGP_SYM_AES_256 = 9, PGP_SYM_AES_256 = 9,
PGP_SYM_TWOFISH = 10 PGP_SYM_TWOFISH = 10,
}; };
enum PGP_COMPR_TYPE enum PGP_COMPR_TYPE
@ -92,7 +92,7 @@ enum PGP_COMPR_TYPE
PGP_COMPR_NONE = 0, /* must */ PGP_COMPR_NONE = 0, /* must */
PGP_COMPR_ZIP = 1, /* should */ PGP_COMPR_ZIP = 1, /* should */
PGP_COMPR_ZLIB = 2, PGP_COMPR_ZLIB = 2,
PGP_COMPR_BZIP2 = 3 PGP_COMPR_BZIP2 = 3,
}; };
enum PGP_DIGEST_TYPE enum PGP_DIGEST_TYPE
@ -106,7 +106,7 @@ enum PGP_DIGEST_TYPE
PGP_DIGEST_HAVAL5_160 = 7, /* obsolete */ PGP_DIGEST_HAVAL5_160 = 7, /* obsolete */
PGP_DIGEST_SHA256 = 8, PGP_DIGEST_SHA256 = 8,
PGP_DIGEST_SHA384 = 9, PGP_DIGEST_SHA384 = 9,
PGP_DIGEST_SHA512 = 10 PGP_DIGEST_SHA512 = 10,
}; };
#define PGP_MAX_KEY (256/8) #define PGP_MAX_KEY (256/8)

View File

@ -83,7 +83,7 @@ typedef enum
* it has default collation that is not * it has default collation that is not
* traceable to a foreign Var */ * traceable to a foreign Var */
FDW_COLLATE_SAFE, /* collation derives from a foreign Var */ FDW_COLLATE_SAFE, /* collation derives from a foreign Var */
FDW_COLLATE_UNSAFE /* collation is non-default and derives from FDW_COLLATE_UNSAFE, /* collation is non-default and derives from
* something other than a foreign Var */ * something other than a foreign Var */
} FDWCollateState; } FDWCollateState;

View File

@ -82,7 +82,7 @@ enum FdwScanPrivateIndex
* String describing join i.e. names of relations being joined and types * String describing join i.e. names of relations being joined and types
* of join, added when the scan is join * of join, added when the scan is join
*/ */
FdwScanPrivateRelations FdwScanPrivateRelations,
}; };
/* /*
@ -108,7 +108,7 @@ enum FdwModifyPrivateIndex
/* has-returning flag (as a Boolean node) */ /* has-returning flag (as a Boolean node) */
FdwModifyPrivateHasReturning, FdwModifyPrivateHasReturning,
/* Integer list of attribute numbers retrieved by RETURNING */ /* Integer list of attribute numbers retrieved by RETURNING */
FdwModifyPrivateRetrievedAttrs FdwModifyPrivateRetrievedAttrs,
}; };
/* /*
@ -129,7 +129,7 @@ enum FdwDirectModifyPrivateIndex
/* Integer list of attribute numbers retrieved by RETURNING */ /* Integer list of attribute numbers retrieved by RETURNING */
FdwDirectModifyPrivateRetrievedAttrs, FdwDirectModifyPrivateRetrievedAttrs,
/* set-processed flag (as a Boolean node) */ /* set-processed flag (as a Boolean node) */
FdwDirectModifyPrivateSetProcessed FdwDirectModifyPrivateSetProcessed,
}; };
/* /*
@ -285,7 +285,7 @@ enum FdwPathPrivateIndex
/* has-final-sort flag (as a Boolean node) */ /* has-final-sort flag (as a Boolean node) */
FdwPathPrivateHasFinalSort, FdwPathPrivateHasFinalSort,
/* has-limit flag (as a Boolean node) */ /* has-limit flag (as a Boolean node) */
FdwPathPrivateHasLimit FdwPathPrivateHasLimit,
}; };
/* Struct for extra information passed to estimate_path_cost_size() */ /* Struct for extra information passed to estimate_path_cost_size() */

View File

@ -143,7 +143,7 @@ typedef enum PgFdwSamplingMethod
ANALYZE_SAMPLE_AUTO, /* choose by server version */ ANALYZE_SAMPLE_AUTO, /* choose by server version */
ANALYZE_SAMPLE_RANDOM, /* remote random() */ ANALYZE_SAMPLE_RANDOM, /* remote random() */
ANALYZE_SAMPLE_SYSTEM, /* TABLESAMPLE system */ ANALYZE_SAMPLE_SYSTEM, /* TABLESAMPLE system */
ANALYZE_SAMPLE_BERNOULLI /* TABLESAMPLE bernoulli */ ANALYZE_SAMPLE_BERNOULLI, /* TABLESAMPLE bernoulli */
} PgFdwSamplingMethod; } PgFdwSamplingMethod;
/* in postgres_fdw.c */ /* in postgres_fdw.c */

View File

@ -35,7 +35,7 @@ enum trivalue
{ {
TRI_DEFAULT, TRI_DEFAULT,
TRI_NO, TRI_NO,
TRI_YES TRI_YES,
}; };
struct _param struct _param

View File

@ -75,7 +75,7 @@ typedef enum
GIST_BUFFERING_STATS, /* gathering statistics of index tuple size GIST_BUFFERING_STATS, /* gathering statistics of index tuple size
* before switching to the buffering build * before switching to the buffering build
* mode */ * mode */
GIST_BUFFERING_ACTIVE /* in buffering build mode */ GIST_BUFFERING_ACTIVE, /* in buffering build mode */
} GistBuildMode; } GistBuildMode;
/* Working state for gistbuild and its callback */ /* Working state for gistbuild and its callback */

View File

@ -135,7 +135,7 @@ typedef enum
VACUUM_ERRCB_PHASE_VACUUM_INDEX, VACUUM_ERRCB_PHASE_VACUUM_INDEX,
VACUUM_ERRCB_PHASE_VACUUM_HEAP, VACUUM_ERRCB_PHASE_VACUUM_HEAP,
VACUUM_ERRCB_PHASE_INDEX_CLEANUP, VACUUM_ERRCB_PHASE_INDEX_CLEANUP,
VACUUM_ERRCB_PHASE_TRUNCATE VACUUM_ERRCB_PHASE_TRUNCATE,
} VacErrPhase; } VacErrPhase;
typedef struct LVRelState typedef struct LVRelState

View File

@ -56,7 +56,7 @@ typedef enum
BTPARALLEL_NOT_INITIALIZED, BTPARALLEL_NOT_INITIALIZED,
BTPARALLEL_ADVANCING, BTPARALLEL_ADVANCING,
BTPARALLEL_IDLE, BTPARALLEL_IDLE,
BTPARALLEL_DONE BTPARALLEL_DONE,
} BTPS_State; } BTPS_State;
/* /*

View File

@ -22,7 +22,7 @@ typedef enum
/* strategy for searching through materialized list of split points */ /* strategy for searching through materialized list of split points */
SPLIT_DEFAULT, /* give some weight to truncation */ SPLIT_DEFAULT, /* give some weight to truncation */
SPLIT_MANY_DUPLICATES, /* find minimally distinguishing point */ SPLIT_MANY_DUPLICATES, /* find minimally distinguishing point */
SPLIT_SINGLE_VALUE /* leave left page almost full */ SPLIT_SINGLE_VALUE, /* leave left page almost full */
} FindSplitStrat; } FindSplitStrat;
typedef struct typedef struct

View File

@ -756,7 +756,7 @@ enum SpGistSpecialOffsetNumbers
{ {
SpGistBreakOffsetNumber = InvalidOffsetNumber, SpGistBreakOffsetNumber = InvalidOffsetNumber,
SpGistRedirectOffsetNumber = MaxOffsetNumber + 1, SpGistRedirectOffsetNumber = MaxOffsetNumber + 1,
SpGistErrorOffsetNumber = MaxOffsetNumber + 2 SpGistErrorOffsetNumber = MaxOffsetNumber + 2,
}; };
static OffsetNumber static OffsetNumber

View File

@ -128,7 +128,7 @@ typedef enum
SLRU_READ_FAILED, SLRU_READ_FAILED,
SLRU_WRITE_FAILED, SLRU_WRITE_FAILED,
SLRU_FSYNC_FAILED, SLRU_FSYNC_FAILED,
SLRU_CLOSE_FAILED SLRU_CLOSE_FAILED,
} SlruErrorCause; } SlruErrorCause;
static SlruErrorCause slru_errcause; static SlruErrorCause slru_errcause;

View File

@ -145,7 +145,7 @@ typedef enum TransState
TRANS_INPROGRESS, /* inside a valid transaction */ TRANS_INPROGRESS, /* inside a valid transaction */
TRANS_COMMIT, /* commit in progress */ TRANS_COMMIT, /* commit in progress */
TRANS_ABORT, /* abort in progress */ TRANS_ABORT, /* abort in progress */
TRANS_PREPARE /* prepare in progress */ TRANS_PREPARE, /* prepare in progress */
} TransState; } TransState;
/* /*
@ -180,7 +180,7 @@ typedef enum TBlockState
TBLOCK_SUBABORT_END, /* failed subxact, ROLLBACK received */ TBLOCK_SUBABORT_END, /* failed subxact, ROLLBACK received */
TBLOCK_SUBABORT_PENDING, /* live subxact, ROLLBACK received */ TBLOCK_SUBABORT_PENDING, /* live subxact, ROLLBACK received */
TBLOCK_SUBRESTART, /* live subxact, ROLLBACK TO received */ TBLOCK_SUBRESTART, /* live subxact, ROLLBACK TO received */
TBLOCK_SUBABORT_RESTART /* failed subxact, ROLLBACK TO received */ TBLOCK_SUBABORT_RESTART, /* failed subxact, ROLLBACK TO received */
} TBlockState; } TBlockState;
/* /*

View File

@ -88,7 +88,7 @@ typedef enum
{ {
LRQ_NEXT_NO_IO, LRQ_NEXT_NO_IO,
LRQ_NEXT_IO, LRQ_NEXT_IO,
LRQ_NEXT_AGAIN LRQ_NEXT_AGAIN,
} LsnReadQueueNextStatus; } LsnReadQueueNextStatus;
/* /*

View File

@ -211,7 +211,7 @@ typedef enum
XLOG_FROM_ANY = 0, /* request to read WAL from any source */ XLOG_FROM_ANY = 0, /* request to read WAL from any source */
XLOG_FROM_ARCHIVE, /* restored using restore_command */ XLOG_FROM_ARCHIVE, /* restored using restore_command */
XLOG_FROM_PG_WAL, /* existing file in pg_wal */ XLOG_FROM_PG_WAL, /* existing file in pg_wal */
XLOG_FROM_STREAM /* streamed from primary */ XLOG_FROM_STREAM, /* streamed from primary */
} XLogSource; } XLogSource;
/* human-readable names for XLogSources, for debugging output */ /* human-readable names for XLogSources, for debugging output */

View File

@ -73,7 +73,7 @@ typedef enum
{ {
LOCAL_OBJECT, LOCAL_OBJECT,
SHARED_OBJECT, SHARED_OBJECT,
REMOTE_OBJECT REMOTE_OBJECT,
} SharedDependencyObjectType; } SharedDependencyObjectType;
typedef struct typedef struct

View File

@ -351,7 +351,7 @@ typedef enum
{ {
LISTEN_LISTEN, LISTEN_LISTEN,
LISTEN_UNLISTEN, LISTEN_UNLISTEN,
LISTEN_UNLISTEN_ALL LISTEN_UNLISTEN_ALL,
} ListenActionKind; } ListenActionKind;
typedef struct typedef struct

View File

@ -51,7 +51,7 @@ typedef enum CopyDest
{ {
COPY_FILE, /* to file (or a piped program) */ COPY_FILE, /* to file (or a piped program) */
COPY_FRONTEND, /* to frontend */ COPY_FRONTEND, /* to frontend */
COPY_CALLBACK /* to callback function */ COPY_CALLBACK, /* to callback function */
} CopyDest; } CopyDest;
/* /*

View File

@ -83,7 +83,7 @@
typedef enum CreateDBStrategy typedef enum CreateDBStrategy
{ {
CREATEDB_WAL_LOG, CREATEDB_WAL_LOG,
CREATEDB_FILE_COPY CREATEDB_FILE_COPY,
} CreateDBStrategy; } CreateDBStrategy;
typedef struct typedef struct

View File

@ -64,7 +64,7 @@ typedef enum
RRG_REMOVE_ADMIN_OPTION, RRG_REMOVE_ADMIN_OPTION,
RRG_REMOVE_INHERIT_OPTION, RRG_REMOVE_INHERIT_OPTION,
RRG_REMOVE_SET_OPTION, RRG_REMOVE_SET_OPTION,
RRG_DELETE_GRANT RRG_DELETE_GRANT,
} RevokeRoleGrantAction; } RevokeRoleGrantAction;
/* Potentially set by pg_upgrade_support functions */ /* Potentially set by pg_upgrade_support functions */

View File

@ -118,7 +118,7 @@ typedef enum PVIndVacStatus
PARALLEL_INDVAC_STATUS_INITIAL = 0, PARALLEL_INDVAC_STATUS_INITIAL = 0,
PARALLEL_INDVAC_STATUS_NEED_BULKDELETE, PARALLEL_INDVAC_STATUS_NEED_BULKDELETE,
PARALLEL_INDVAC_STATUS_NEED_CLEANUP, PARALLEL_INDVAC_STATUS_NEED_CLEANUP,
PARALLEL_INDVAC_STATUS_COMPLETED PARALLEL_INDVAC_STATUS_COMPLETED,
} PVIndVacStatus; } PVIndVacStatus;
/* /*

View File

@ -121,7 +121,7 @@ typedef enum
{ {
CEOUC_WAIT, CEOUC_WAIT,
CEOUC_NOWAIT, CEOUC_NOWAIT,
CEOUC_LIVELOCK_PREVENTING_WAIT CEOUC_LIVELOCK_PREVENTING_WAIT,
} CEOUC_WAIT_MODE; } CEOUC_WAIT_MODE;
static bool check_exclusion_or_unique_constraint(Relation heap, Relation index, static bool check_exclusion_or_unique_constraint(Relation heap, Relation index,

View File

@ -59,7 +59,7 @@ typedef struct
*/ */
typedef enum typedef enum
{ {
F_EXEC_START, F_EXEC_RUN, F_EXEC_DONE F_EXEC_START, F_EXEC_RUN, F_EXEC_DONE,
} ExecStatus; } ExecStatus;
typedef struct execution_state typedef struct execution_state

View File

@ -145,7 +145,7 @@ typedef enum
{ {
MJEVAL_MATCHABLE, /* normal, potentially matchable tuple */ MJEVAL_MATCHABLE, /* normal, potentially matchable tuple */
MJEVAL_NONMATCHABLE, /* tuple cannot join because it has a null */ MJEVAL_NONMATCHABLE, /* tuple cannot join because it has a null */
MJEVAL_ENDOFJOIN /* end of input (physical or effective) */ MJEVAL_ENDOFJOIN, /* end of input (physical or effective) */
} MJEvalResult; } MJEvalResult;

View File

@ -39,7 +39,7 @@
typedef enum typedef enum
{ {
TIDEXPR_UPPER_BOUND, TIDEXPR_UPPER_BOUND,
TIDEXPR_LOWER_BOUND TIDEXPR_LOWER_BOUND,
} TidExprType; } TidExprType;
/* Upper or lower range bound for scan */ /* Upper or lower range bound for scan */

View File

@ -129,7 +129,7 @@ typedef enum
{ {
SCRAM_AUTH_INIT, SCRAM_AUTH_INIT,
SCRAM_AUTH_SALT_SENT, SCRAM_AUTH_SALT_SENT,
SCRAM_AUTH_FINISHED SCRAM_AUTH_FINISHED,
} scram_state_enum; } scram_state_enum;
typedef struct typedef struct

View File

@ -129,7 +129,7 @@ typedef enum
{ {
TBM_EMPTY, /* no hashtable, nentries == 0 */ TBM_EMPTY, /* no hashtable, nentries == 0 */
TBM_ONE_PAGE, /* entry1 contains the single entry */ TBM_ONE_PAGE, /* entry1 contains the single entry */
TBM_HASH /* pagetable is valid, entry1 is not */ TBM_HASH, /* pagetable is valid, entry1 is not */
} TBMStatus; } TBMStatus;
/* /*
@ -139,7 +139,7 @@ typedef enum
{ {
TBM_NOT_ITERATING, /* not yet converted to page and chunk array */ TBM_NOT_ITERATING, /* not yet converted to page and chunk array */
TBM_ITERATING_PRIVATE, /* converted to local page and chunk array */ TBM_ITERATING_PRIVATE, /* converted to local page and chunk array */
TBM_ITERATING_SHARED /* converted to shared page and chunk array */ TBM_ITERATING_SHARED, /* converted to shared page and chunk array */
} TBMIteratingState; } TBMIteratingState;
/* /*

View File

@ -74,7 +74,7 @@ typedef enum pushdown_safe_type
{ {
PUSHDOWN_UNSAFE, /* unsafe to push qual into subquery */ PUSHDOWN_UNSAFE, /* unsafe to push qual into subquery */
PUSHDOWN_SAFE, /* safe to push qual into subquery */ PUSHDOWN_SAFE, /* safe to push qual into subquery */
PUSHDOWN_WINDOWCLAUSE_RUNCOND /* unsafe, but may work as WindowClause PUSHDOWN_WINDOWCLAUSE_RUNCOND, /* unsafe, but may work as WindowClause
* run condition */ * run condition */
} pushdown_safe_type; } pushdown_safe_type;

View File

@ -45,7 +45,7 @@ typedef enum
{ {
ST_INDEXSCAN, /* must support amgettuple */ ST_INDEXSCAN, /* must support amgettuple */
ST_BITMAPSCAN, /* must support amgetbitmap */ ST_BITMAPSCAN, /* must support amgetbitmap */
ST_ANYSCAN /* either is okay */ ST_ANYSCAN, /* either is okay */
} ScanTypeControl; } ScanTypeControl;
/* Data structure for collecting qual clauses that match an index */ /* Data structure for collecting qual clauses that match an index */

View File

@ -35,7 +35,7 @@ typedef enum
{ {
NRM_EQUAL, /* expect exact match of nullingrels */ NRM_EQUAL, /* expect exact match of nullingrels */
NRM_SUBSET, /* actual Var may have a subset of input */ NRM_SUBSET, /* actual Var may have a subset of input */
NRM_SUPERSET /* actual Var may have a superset of input */ NRM_SUPERSET, /* actual Var may have a superset of input */
} NullingRelsMatch; } NullingRelsMatch;
typedef struct typedef struct

View File

@ -40,7 +40,7 @@ typedef enum
COSTS_EQUAL, /* path costs are fuzzily equal */ COSTS_EQUAL, /* path costs are fuzzily equal */
COSTS_BETTER1, /* first path is cheaper than second */ COSTS_BETTER1, /* first path is cheaper than second */
COSTS_BETTER2, /* second path is cheaper than first */ COSTS_BETTER2, /* second path is cheaper than first */
COSTS_DIFFERENT /* neither path dominates the other on cost */ COSTS_DIFFERENT, /* neither path dominates the other on cost */
} PathCostComparison; } PathCostComparison;
/* /*

View File

@ -51,7 +51,7 @@ typedef enum
{ {
CLASS_ATOM, /* expression that's not AND or OR */ CLASS_ATOM, /* expression that's not AND or OR */
CLASS_AND, /* expression with AND semantics */ CLASS_AND, /* expression with AND semantics */
CLASS_OR /* expression with OR semantics */ CLASS_OR, /* expression with OR semantics */
} PredClass; } PredClass;
typedef struct PredIterInfoData *PredIterInfo; typedef struct PredIterInfoData *PredIterInfo;

View File

@ -58,7 +58,7 @@ typedef enum
COLLATE_NONE, /* expression is of a noncollatable datatype */ COLLATE_NONE, /* expression is of a noncollatable datatype */
COLLATE_IMPLICIT, /* collation was derived implicitly */ COLLATE_IMPLICIT, /* collation was derived implicitly */
COLLATE_CONFLICT, /* we had a conflict of implicit collations */ COLLATE_CONFLICT, /* we had a conflict of implicit collations */
COLLATE_EXPLICIT /* collation was derived explicitly */ COLLATE_EXPLICIT, /* collation was derived explicitly */
} CollateStrength; } CollateStrength;
typedef struct typedef struct

View File

@ -35,7 +35,7 @@ typedef enum
RECURSION_SUBLINK, /* inside a sublink */ RECURSION_SUBLINK, /* inside a sublink */
RECURSION_OUTERJOIN, /* inside nullable side of an outer join */ RECURSION_OUTERJOIN, /* inside nullable side of an outer join */
RECURSION_INTERSECT, /* underneath INTERSECT (ALL) */ RECURSION_INTERSECT, /* underneath INTERSECT (ALL) */
RECURSION_EXCEPT /* underneath EXCEPT (ALL) */ RECURSION_EXCEPT, /* underneath EXCEPT (ALL) */
} RecursionContext; } RecursionContext;
/* Associated error messages --- each must have one %s for CTE name */ /* Associated error messages --- each must have one %s for CTE name */

View File

@ -39,7 +39,7 @@
typedef enum typedef enum
{ {
FUNCLOOKUP_NOSUCHFUNC, FUNCLOOKUP_NOSUCHFUNC,
FUNCLOOKUP_AMBIGUOUS FUNCLOOKUP_AMBIGUOUS,
} FuncLookupError; } FuncLookupError;
static void unify_hypothetical_args(ParseState *pstate, static void unify_hypothetical_args(ParseState *pstate,

View File

@ -82,7 +82,7 @@ typedef enum PartClauseMatchStatus
PARTCLAUSE_MATCH_NULLNESS, PARTCLAUSE_MATCH_NULLNESS,
PARTCLAUSE_MATCH_STEPS, PARTCLAUSE_MATCH_STEPS,
PARTCLAUSE_MATCH_CONTRADICT, PARTCLAUSE_MATCH_CONTRADICT,
PARTCLAUSE_UNSUPPORTED PARTCLAUSE_UNSUPPORTED,
} PartClauseMatchStatus; } PartClauseMatchStatus;
/* /*
@ -93,7 +93,7 @@ typedef enum PartClauseTarget
{ {
PARTTARGET_PLANNER, /* want to prune during planning */ PARTTARGET_PLANNER, /* want to prune during planning */
PARTTARGET_INITIAL, /* want to prune during executor startup */ PARTTARGET_INITIAL, /* want to prune during executor startup */
PARTTARGET_EXEC /* want to prune during each plan node scan */ PARTTARGET_EXEC, /* want to prune during each plan node scan */
} PartClauseTarget; } PartClauseTarget;
/* /*

View File

@ -86,7 +86,7 @@ typedef enum
SHMSTATE_ATTACHED, /* pertinent to DataDir, has attached PIDs */ SHMSTATE_ATTACHED, /* pertinent to DataDir, has attached PIDs */
SHMSTATE_ENOENT, /* no segment of that ID */ SHMSTATE_ENOENT, /* no segment of that ID */
SHMSTATE_FOREIGN, /* exists, but not pertinent to DataDir */ SHMSTATE_FOREIGN, /* exists, but not pertinent to DataDir */
SHMSTATE_UNATTACHED /* pertinent to DataDir, no attached PIDs */ SHMSTATE_UNATTACHED, /* pertinent to DataDir, no attached PIDs */
} IpcMemoryState; } IpcMemoryState;

View File

@ -250,7 +250,7 @@ typedef enum
{ {
AutoVacForkFailed, /* failed trying to start a worker */ AutoVacForkFailed, /* failed trying to start a worker */
AutoVacRebalance, /* rebalance the cost limits */ AutoVacRebalance, /* rebalance the cost limits */
AutoVacNumSignals /* must be last */ AutoVacNumSignals, /* must be last */
} AutoVacuumSignal; } AutoVacuumSignal;
/* /*

View File

@ -262,7 +262,7 @@ typedef enum
STARTUP_NOT_RUNNING, STARTUP_NOT_RUNNING,
STARTUP_RUNNING, STARTUP_RUNNING,
STARTUP_SIGNALED, /* we sent it a SIGQUIT or SIGKILL */ STARTUP_SIGNALED, /* we sent it a SIGQUIT or SIGKILL */
STARTUP_CRASHED STARTUP_CRASHED,
} StartupStatusEnum; } StartupStatusEnum;
static StartupStatusEnum StartupStatus = STARTUP_NOT_RUNNING; static StartupStatusEnum StartupStatus = STARTUP_NOT_RUNNING;
@ -332,7 +332,7 @@ typedef enum
PM_SHUTDOWN_2, /* waiting for archiver and walsenders to PM_SHUTDOWN_2, /* waiting for archiver and walsenders to
* finish */ * finish */
PM_WAIT_DEAD_END, /* waiting for dead_end children to exit */ PM_WAIT_DEAD_END, /* waiting for dead_end children to exit */
PM_NO_CHILDREN /* all important children have exited */ PM_NO_CHILDREN, /* all important children have exited */
} PMState; } PMState;
static PMState pmState = PM_INIT; static PMState pmState = PM_INIT;

View File

@ -68,7 +68,7 @@ typedef enum
PG_REGEX_LOCALE_1BYTE, /* Use <ctype.h> functions */ PG_REGEX_LOCALE_1BYTE, /* Use <ctype.h> functions */
PG_REGEX_LOCALE_WIDE_L, /* Use locale_t <wctype.h> functions */ PG_REGEX_LOCALE_WIDE_L, /* Use locale_t <wctype.h> functions */
PG_REGEX_LOCALE_1BYTE_L, /* Use locale_t <ctype.h> functions */ PG_REGEX_LOCALE_1BYTE_L, /* Use locale_t <ctype.h> functions */
PG_REGEX_LOCALE_ICU /* Use ICU uchar.h functions */ PG_REGEX_LOCALE_ICU, /* Use ICU uchar.h functions */
} PG_Locale_Strategy; } PG_Locale_Strategy;
static PG_Locale_Strategy pg_regex_strategy; static PG_Locale_Strategy pg_regex_strategy;

View File

@ -289,7 +289,7 @@ typedef enum
TRANS_LEADER_SERIALIZE, TRANS_LEADER_SERIALIZE,
TRANS_LEADER_SEND_TO_PARALLEL, TRANS_LEADER_SEND_TO_PARALLEL,
TRANS_LEADER_PARTIAL_SERIALIZE, TRANS_LEADER_PARTIAL_SERIALIZE,
TRANS_PARALLEL_APPLY TRANS_PARALLEL_APPLY,
} TransApplyAction; } TransApplyAction;
/* errcontext tracker */ /* errcontext tracker */

View File

@ -100,7 +100,7 @@ enum RowFilterPubAction
{ {
PUBACTION_INSERT, PUBACTION_INSERT,
PUBACTION_UPDATE, PUBACTION_UPDATE,
PUBACTION_DELETE PUBACTION_DELETE,
}; };
#define NUM_ROWFILTER_PUBACTIONS (PUBACTION_DELETE+1) #define NUM_ROWFILTER_PUBACTIONS (PUBACTION_DELETE+1)

View File

@ -122,7 +122,7 @@ typedef enum WalRcvWakeupReason
WALRCV_WAKEUP_TERMINATE, WALRCV_WAKEUP_TERMINATE,
WALRCV_WAKEUP_PING, WALRCV_WAKEUP_PING,
WALRCV_WAKEUP_REPLY, WALRCV_WAKEUP_REPLY,
WALRCV_WAKEUP_HSFEEDBACK WALRCV_WAKEUP_HSFEEDBACK,
#define NUM_WALRCV_WAKEUPS (WALRCV_WAKEUP_HSFEEDBACK + 1) #define NUM_WALRCV_WAKEUPS (WALRCV_WAKEUP_HSFEEDBACK + 1)
} WalRcvWakeupReason; } WalRcvWakeupReason;

View File

@ -249,7 +249,7 @@ typedef enum
AllocateDescFile, AllocateDescFile,
AllocateDescPipe, AllocateDescPipe,
AllocateDescDir, AllocateDescDir,
AllocateDescRawFD AllocateDescRawFD,
} AllocateDescKind; } AllocateDescKind;
typedef struct typedef struct

View File

@ -252,7 +252,7 @@ typedef enum GlobalVisHorizonKind
VISHORIZON_SHARED, VISHORIZON_SHARED,
VISHORIZON_CATALOG, VISHORIZON_CATALOG,
VISHORIZON_DATA, VISHORIZON_DATA,
VISHORIZON_TEMP VISHORIZON_TEMP,
} GlobalVisHorizonKind; } GlobalVisHorizonKind;
/* /*
@ -263,7 +263,7 @@ typedef enum KAXCompressReason
KAX_NO_SPACE, /* need to free up space at array end */ KAX_NO_SPACE, /* need to free up space at array end */
KAX_PRUNE, /* we just pruned old entries */ KAX_PRUNE, /* we just pruned old entries */
KAX_TRANSACTION_END, /* we just committed/removed some XIDs */ KAX_TRANSACTION_END, /* we just committed/removed some XIDs */
KAX_STARTUP_PROCESS_IDLE /* startup process is about to sleep */ KAX_STARTUP_PROCESS_IDLE, /* startup process is about to sleep */
} KAXCompressReason; } KAXCompressReason;

View File

@ -63,7 +63,7 @@ typedef enum
ARRAY_QUOTED_ELEM_COMPLETED, ARRAY_QUOTED_ELEM_COMPLETED,
ARRAY_ELEM_DELIMITED, ARRAY_ELEM_DELIMITED,
ARRAY_LEVEL_COMPLETED, ARRAY_LEVEL_COMPLETED,
ARRAY_LEVEL_DELIMITED ARRAY_LEVEL_DELIMITED,
} ArrayParseState; } ArrayParseState;
/* Working state for array_iterate() */ /* Working state for array_iterate() */

View File

@ -137,7 +137,7 @@ typedef enum
{ {
FROM_CHAR_DATE_NONE = 0, /* Value does not affect date mode. */ FROM_CHAR_DATE_NONE = 0, /* Value does not affect date mode. */
FROM_CHAR_DATE_GREGORIAN, /* Gregorian (day, month, year) style date */ FROM_CHAR_DATE_GREGORIAN, /* Gregorian (day, month, year) style date */
FROM_CHAR_DATE_ISOWEEK /* ISO 8601 week date */ FROM_CHAR_DATE_ISOWEEK, /* ISO 8601 week date */
} FromCharDateMode; } FromCharDateMode;
typedef struct typedef struct

View File

@ -88,7 +88,7 @@ typedef enum JsonPathGinNodeType
{ {
JSP_GIN_OR, JSP_GIN_OR,
JSP_GIN_AND, JSP_GIN_AND,
JSP_GIN_ENTRY JSP_GIN_ENTRY,
} JsonPathGinNodeType; } JsonPathGinNodeType;
typedef struct JsonPathGinNode JsonPathGinNode; typedef struct JsonPathGinNode JsonPathGinNode;

View File

@ -201,7 +201,7 @@ typedef enum TypeCat
TYPECAT_ARRAY = 'a', TYPECAT_ARRAY = 'a',
TYPECAT_COMPOSITE = 'c', TYPECAT_COMPOSITE = 'c',
TYPECAT_COMPOSITE_DOMAIN = 'C', TYPECAT_COMPOSITE_DOMAIN = 'C',
TYPECAT_DOMAIN = 'd' TYPECAT_DOMAIN = 'd',
} TypeCat; } TypeCat;
/* these two are stolen from hstore / record_out, used in populate_record* */ /* these two are stolen from hstore / record_out, used in populate_record* */

View File

@ -62,12 +62,12 @@ typedef enum
Pattern_Type_Like_IC, Pattern_Type_Like_IC,
Pattern_Type_Regex, Pattern_Type_Regex,
Pattern_Type_Regex_IC, Pattern_Type_Regex_IC,
Pattern_Type_Prefix Pattern_Type_Prefix,
} Pattern_Type; } Pattern_Type;
typedef enum typedef enum
{ {
Pattern_Prefix_None, Pattern_Prefix_Partial, Pattern_Prefix_Exact Pattern_Prefix_None, Pattern_Prefix_Partial, Pattern_Prefix_Exact,
} Pattern_Prefix_Status; } Pattern_Prefix_Status;
static Node *like_regex_support(Node *rawreq, Pattern_Type ptype); static Node *like_regex_support(Node *rawreq, Pattern_Type ptype);

View File

@ -62,7 +62,7 @@ typedef struct
typedef enum typedef enum
{ {
SPLIT_LEFT = 0, /* makes initialization to SPLIT_LEFT easier */ SPLIT_LEFT = 0, /* makes initialization to SPLIT_LEFT easier */
SPLIT_RIGHT SPLIT_RIGHT,
} SplitLR; } SplitLR;
/* /*

View File

@ -41,7 +41,7 @@ typedef enum
{ {
WAITOPERAND = 1, WAITOPERAND = 1,
WAITOPERATOR = 2, WAITOPERATOR = 2,
WAITFIRSTOPERAND = 3 WAITFIRSTOPERAND = 3,
} ts_parserstate; } ts_parserstate;
/* /*
@ -54,7 +54,7 @@ typedef enum
PT_VAL = 2, PT_VAL = 2,
PT_OPR = 3, PT_OPR = 3,
PT_OPEN = 4, PT_OPEN = 4,
PT_CLOSE = 5 PT_CLOSE = 5,
} ts_tokentype; } ts_tokentype;
/* /*

View File

@ -35,7 +35,7 @@ typedef enum
{ {
ETCS_NEEDS_REBUILD, ETCS_NEEDS_REBUILD,
ETCS_REBUILD_STARTED, ETCS_REBUILD_STARTED,
ETCS_VALID ETCS_VALID,
} EventTriggerCacheStateType; } EventTriggerCacheStateType;
typedef struct typedef struct

View File

@ -162,7 +162,7 @@ typedef enum
TSS_BUILDRUNS, /* Loading tuples; writing to tape */ TSS_BUILDRUNS, /* Loading tuples; writing to tape */
TSS_SORTEDINMEM, /* Sort completed entirely in memory */ TSS_SORTEDINMEM, /* Sort completed entirely in memory */
TSS_SORTEDONTAPE, /* Sort completed, final run is on tape */ TSS_SORTEDONTAPE, /* Sort completed, final run is on tape */
TSS_FINALMERGE /* Performing final merge on-the-fly */ TSS_FINALMERGE, /* Performing final merge on-the-fly */
} TupSortStatus; } TupSortStatus;
/* /*

View File

@ -73,7 +73,7 @@ typedef enum
{ {
TSS_INMEM, /* Tuples still fit in memory */ TSS_INMEM, /* Tuples still fit in memory */
TSS_WRITEFILE, /* Writing to temp file */ TSS_WRITEFILE, /* Writing to temp file */
TSS_READFILE /* Reading from temp file */ TSS_READFILE, /* Reading from temp file */
} TupStoreStatus; } TupStoreStatus;
/* /*

View File

@ -56,7 +56,7 @@ typedef enum
BBSTREAMER_MEMBER_HEADER, BBSTREAMER_MEMBER_HEADER,
BBSTREAMER_MEMBER_CONTENTS, BBSTREAMER_MEMBER_CONTENTS,
BBSTREAMER_MEMBER_TRAILER, BBSTREAMER_MEMBER_TRAILER,
BBSTREAMER_ARCHIVE_TRAILER BBSTREAMER_ARCHIVE_TRAILER,
} bbstreamer_archive_context; } bbstreamer_archive_context;
/* /*

View File

@ -108,7 +108,7 @@ typedef enum
{ {
NO_WAL, NO_WAL,
FETCH_WAL, FETCH_WAL,
STREAM_WAL STREAM_WAL,
} IncludeWal; } IncludeWal;
/* /*
@ -118,7 +118,7 @@ typedef enum
{ {
COMPRESS_LOCATION_UNSPECIFIED, COMPRESS_LOCATION_UNSPECIFIED,
COMPRESS_LOCATION_CLIENT, COMPRESS_LOCATION_CLIENT,
COMPRESS_LOCATION_SERVER COMPRESS_LOCATION_SERVER,
} CompressionLocation; } CompressionLocation;
/* Global options */ /* Global options */

View File

@ -32,7 +32,7 @@ typedef enum
{ {
CLOSE_NORMAL, CLOSE_NORMAL,
CLOSE_UNLINK, CLOSE_UNLINK,
CLOSE_NO_RENAME CLOSE_NO_RENAME,
} WalCloseMethod; } WalCloseMethod;
/* /*

View File

@ -50,7 +50,7 @@ typedef enum
{ {
PG_MODE_CHECK, PG_MODE_CHECK,
PG_MODE_DISABLE, PG_MODE_DISABLE,
PG_MODE_ENABLE PG_MODE_ENABLE,
} PgChecksumMode; } PgChecksumMode;
static PgChecksumMode mode = PG_MODE_CHECK; static PgChecksumMode mode = PG_MODE_CHECK;

View File

@ -38,14 +38,14 @@ typedef enum
{ {
SMART_MODE, SMART_MODE,
FAST_MODE, FAST_MODE,
IMMEDIATE_MODE IMMEDIATE_MODE,
} ShutdownMode; } ShutdownMode;
typedef enum typedef enum
{ {
POSTMASTER_READY, POSTMASTER_READY,
POSTMASTER_STILL_STARTING, POSTMASTER_STILL_STARTING,
POSTMASTER_FAILED POSTMASTER_FAILED,
} WaitPMResult; } WaitPMResult;
typedef enum typedef enum
@ -62,7 +62,7 @@ typedef enum
KILL_COMMAND, KILL_COMMAND,
REGISTER_COMMAND, REGISTER_COMMAND,
UNREGISTER_COMMAND, UNREGISTER_COMMAND,
RUN_AS_SERVICE_COMMAND RUN_AS_SERVICE_COMMAND,
} CtlCommand; } CtlCommand;
#define DEFAULT_WAIT 60 #define DEFAULT_WAIT 60

View File

@ -77,7 +77,7 @@ typedef enum
WRKR_NOT_STARTED = 0, WRKR_NOT_STARTED = 0,
WRKR_IDLE, WRKR_IDLE,
WRKR_WORKING, WRKR_WORKING,
WRKR_TERMINATED WRKR_TERMINATED,
} T_WorkerStatus; } T_WorkerStatus;
#define WORKER_IS_RUNNING(workerStatus) \ #define WORKER_IS_RUNNING(workerStatus) \

View File

@ -32,7 +32,7 @@ typedef enum
WFW_NO_WAIT, WFW_NO_WAIT,
WFW_GOT_STATUS, WFW_GOT_STATUS,
WFW_ONE_IDLE, WFW_ONE_IDLE,
WFW_ALL_IDLE WFW_ALL_IDLE,
} WFW_WaitOption; } WFW_WaitOption;
/* /*

View File

@ -33,7 +33,7 @@ typedef enum trivalue
{ {
TRI_DEFAULT, TRI_DEFAULT,
TRI_NO, TRI_NO,
TRI_YES TRI_YES,
} trivalue; } trivalue;
typedef enum _archiveFormat typedef enum _archiveFormat
@ -42,14 +42,14 @@ typedef enum _archiveFormat
archCustom = 1, archCustom = 1,
archTar = 3, archTar = 3,
archNull = 4, archNull = 4,
archDirectory = 5 archDirectory = 5,
} ArchiveFormat; } ArchiveFormat;
typedef enum _archiveMode typedef enum _archiveMode
{ {
archModeAppend, archModeAppend,
archModeWrite, archModeWrite,
archModeRead archModeRead,
} ArchiveMode; } ArchiveMode;
typedef enum _teSection typedef enum _teSection
@ -57,7 +57,7 @@ typedef enum _teSection
SECTION_NONE = 1, /* comments, ACLs, etc; can be anywhere */ SECTION_NONE = 1, /* comments, ACLs, etc; can be anywhere */
SECTION_PRE_DATA, /* stuff to be processed before data */ SECTION_PRE_DATA, /* stuff to be processed before data */
SECTION_DATA, /* table data, large objects, LO comments */ SECTION_DATA, /* table data, large objects, LO comments */
SECTION_POST_DATA /* stuff to be processed after data */ SECTION_POST_DATA, /* stuff to be processed after data */
} teSection; } teSection;
/* We need one enum entry per prepared query in pg_dump */ /* We need one enum entry per prepared query in pg_dump */

View File

@ -113,7 +113,7 @@ struct ParallelState;
typedef enum T_Action typedef enum T_Action
{ {
ACT_DUMP, ACT_DUMP,
ACT_RESTORE ACT_RESTORE,
} T_Action; } T_Action;
typedef void (*ClosePtrType) (ArchiveHandle *AH); typedef void (*ClosePtrType) (ArchiveHandle *AH);
@ -151,7 +151,7 @@ typedef enum
{ {
SQL_SCAN = 0, /* normal */ SQL_SCAN = 0, /* normal */
SQL_IN_SINGLE_QUOTE, /* '...' literal */ SQL_IN_SINGLE_QUOTE, /* '...' literal */
SQL_IN_DOUBLE_QUOTE /* "..." identifier */ SQL_IN_DOUBLE_QUOTE, /* "..." identifier */
} sqlparseState; } sqlparseState;
typedef struct typedef struct
@ -166,14 +166,14 @@ typedef enum
STAGE_NONE = 0, STAGE_NONE = 0,
STAGE_INITIALIZING, STAGE_INITIALIZING,
STAGE_PROCESSING, STAGE_PROCESSING,
STAGE_FINALIZING STAGE_FINALIZING,
} ArchiverStage; } ArchiverStage;
typedef enum typedef enum
{ {
OUTPUT_SQLCMDS = 0, /* emitting general SQL commands */ OUTPUT_SQLCMDS = 0, /* emitting general SQL commands */
OUTPUT_COPYDATA, /* writing COPY data */ OUTPUT_COPYDATA, /* writing COPY data */
OUTPUT_OTHERDATA /* writing data as INSERT commands */ OUTPUT_OTHERDATA, /* writing data as INSERT commands */
} ArchiverOutput; } ArchiverOutput;
/* /*
@ -199,7 +199,7 @@ typedef enum
{ {
RESTORE_PASS_MAIN = 0, /* Main pass (most TOC item types) */ RESTORE_PASS_MAIN = 0, /* Main pass (most TOC item types) */
RESTORE_PASS_ACL, /* ACL item types */ RESTORE_PASS_ACL, /* ACL item types */
RESTORE_PASS_POST_ACL /* Event trigger and matview refresh items */ RESTORE_PASS_POST_ACL, /* Event trigger and matview refresh items */
#define RESTORE_PASS_LAST RESTORE_PASS_POST_ACL #define RESTORE_PASS_LAST RESTORE_PASS_POST_ACL
} RestorePass; } RestorePass;

View File

@ -95,7 +95,7 @@ typedef enum OidOptions
{ {
zeroIsError = 1, zeroIsError = 1,
zeroAsStar = 2, zeroAsStar = 2,
zeroAsNone = 4 zeroAsNone = 4,
} OidOptions; } OidOptions;
/* global decls */ /* global decls */

View File

@ -82,7 +82,7 @@ typedef enum
DO_PUBLICATION, DO_PUBLICATION,
DO_PUBLICATION_REL, DO_PUBLICATION_REL,
DO_PUBLICATION_TABLE_IN_SCHEMA, DO_PUBLICATION_TABLE_IN_SCHEMA,
DO_SUBSCRIPTION DO_SUBSCRIPTION,
} DumpableObjectType; } DumpableObjectType;
/* /*

View File

@ -24,7 +24,7 @@ typedef enum
FILE_ACTION_NONE, /* no action (we might still copy modified FILE_ACTION_NONE, /* no action (we might still copy modified
* blocks based on the parsed WAL) */ * blocks based on the parsed WAL) */
FILE_ACTION_TRUNCATE, /* truncate local file to 'newsize' bytes */ FILE_ACTION_TRUNCATE, /* truncate local file to 'newsize' bytes */
FILE_ACTION_REMOVE /* remove local file / directory / symlink */ FILE_ACTION_REMOVE, /* remove local file / directory / symlink */
} file_action_t; } file_action_t;
typedef enum typedef enum
@ -33,7 +33,7 @@ typedef enum
FILE_TYPE_REGULAR, FILE_TYPE_REGULAR,
FILE_TYPE_DIRECTORY, FILE_TYPE_DIRECTORY,
FILE_TYPE_SYMLINK FILE_TYPE_SYMLINK,
} file_type_t; } file_type_t;
/* /*

View File

@ -253,7 +253,7 @@ typedef enum
{ {
TRANSFER_MODE_CLONE, TRANSFER_MODE_CLONE,
TRANSFER_MODE_COPY, TRANSFER_MODE_COPY,
TRANSFER_MODE_LINK TRANSFER_MODE_LINK,
} transferMode; } transferMode;
/* /*
@ -266,7 +266,7 @@ typedef enum
PG_REPORT_NONL, /* these too */ PG_REPORT_NONL, /* these too */
PG_REPORT, PG_REPORT,
PG_WARNING, PG_WARNING,
PG_FATAL PG_FATAL,
} eLogType; } eLogType;

View File

@ -34,7 +34,7 @@ typedef enum
JM_EXPECT_THIS_WAL_RANGE_FIELD, JM_EXPECT_THIS_WAL_RANGE_FIELD,
JM_EXPECT_THIS_WAL_RANGE_VALUE, JM_EXPECT_THIS_WAL_RANGE_VALUE,
JM_EXPECT_MANIFEST_CHECKSUM_VALUE, JM_EXPECT_MANIFEST_CHECKSUM_VALUE,
JM_EXPECT_EOF JM_EXPECT_EOF,
} JsonManifestSemanticState; } JsonManifestSemanticState;
/* /*
@ -47,7 +47,7 @@ typedef enum
JMFF_SIZE, JMFF_SIZE,
JMFF_LAST_MODIFIED, JMFF_LAST_MODIFIED,
JMFF_CHECKSUM_ALGORITHM, JMFF_CHECKSUM_ALGORITHM,
JMFF_CHECKSUM JMFF_CHECKSUM,
} JsonManifestFileField; } JsonManifestFileField;
/* /*
@ -57,7 +57,7 @@ typedef enum
{ {
JMWRF_TIMELINE, JMWRF_TIMELINE,
JMWRF_START_LSN, JMWRF_START_LSN,
JMWRF_END_LSN JMWRF_END_LSN,
} JsonManifestWALRangeField; } JsonManifestWALRangeField;
/* /*

View File

@ -227,7 +227,7 @@ typedef enum
{ {
PART_NONE, /* no partitioning */ PART_NONE, /* no partitioning */
PART_RANGE, /* range partitioning */ PART_RANGE, /* range partitioning */
PART_HASH /* hash partitioning */ PART_HASH, /* hash partitioning */
} partition_method_t; } partition_method_t;
static partition_method_t partition_method = PART_NONE; static partition_method_t partition_method = PART_NONE;
@ -459,7 +459,7 @@ typedef enum EStatus
/* SQL errors */ /* SQL errors */
ESTATUS_SERIALIZATION_ERROR, ESTATUS_SERIALIZATION_ERROR,
ESTATUS_DEADLOCK_ERROR, ESTATUS_DEADLOCK_ERROR,
ESTATUS_OTHER_SQL_ERROR ESTATUS_OTHER_SQL_ERROR,
} EStatus; } EStatus;
/* /*
@ -470,7 +470,7 @@ typedef enum TStatus
TSTATUS_IDLE, TSTATUS_IDLE,
TSTATUS_IN_BLOCK, TSTATUS_IN_BLOCK,
TSTATUS_CONN_ERROR, TSTATUS_CONN_ERROR,
TSTATUS_OTHER_ERROR TSTATUS_OTHER_ERROR,
} TStatus; } TStatus;
/* Various random sequences are initialized from this one. */ /* Various random sequences are initialized from this one. */
@ -587,7 +587,7 @@ typedef enum
* aborted because a command failed, CSTATE_FINISHED means success. * aborted because a command failed, CSTATE_FINISHED means success.
*/ */
CSTATE_ABORTED, CSTATE_ABORTED,
CSTATE_FINISHED CSTATE_FINISHED,
} ConnectionStateEnum; } ConnectionStateEnum;
/* /*
@ -697,7 +697,7 @@ typedef enum MetaCommand
META_ELSE, /* \else */ META_ELSE, /* \else */
META_ENDIF, /* \endif */ META_ENDIF, /* \endif */
META_STARTPIPELINE, /* \startpipeline */ META_STARTPIPELINE, /* \startpipeline */
META_ENDPIPELINE /* \endpipeline */ META_ENDPIPELINE, /* \endpipeline */
} MetaCommand; } MetaCommand;
typedef enum QueryMode typedef enum QueryMode

View File

@ -37,7 +37,7 @@ typedef enum
PGBT_NULL, PGBT_NULL,
PGBT_INT, PGBT_INT,
PGBT_DOUBLE, PGBT_DOUBLE,
PGBT_BOOLEAN PGBT_BOOLEAN,
/* add other types here */ /* add other types here */
} PgBenchValueType; } PgBenchValueType;
@ -58,7 +58,7 @@ typedef enum PgBenchExprType
{ {
ENODE_CONSTANT, ENODE_CONSTANT,
ENODE_VARIABLE, ENODE_VARIABLE,
ENODE_FUNCTION ENODE_FUNCTION,
} PgBenchExprType; } PgBenchExprType;
/* List of operators and callable functions */ /* List of operators and callable functions */
@ -100,7 +100,7 @@ typedef enum PgBenchFunction
PGBENCH_CASE, PGBENCH_CASE,
PGBENCH_HASH_FNV1A, PGBENCH_HASH_FNV1A,
PGBENCH_HASH_MURMUR2, PGBENCH_HASH_MURMUR2,
PGBENCH_PERMUTE PGBENCH_PERMUTE,
} PgBenchFunction; } PgBenchFunction;
typedef struct PgBenchExpr PgBenchExpr; typedef struct PgBenchExpr PgBenchExpr;

View File

@ -53,7 +53,7 @@
typedef enum EditableObjectType typedef enum EditableObjectType
{ {
EditableFunction, EditableFunction,
EditableView EditableView,
} EditableObjectType; } EditableObjectType;
/* local function declarations */ /* local function declarations */

View File

@ -19,7 +19,7 @@ typedef enum _backslashResult
PSQL_CMD_SKIP_LINE, /* keep building query */ PSQL_CMD_SKIP_LINE, /* keep building query */
PSQL_CMD_TERMINATE, /* quit program */ PSQL_CMD_TERMINATE, /* quit program */
PSQL_CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */ PSQL_CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */
PSQL_CMD_ERROR /* the execution of the backslash command PSQL_CMD_ERROR, /* the execution of the backslash command
* resulted in an error */ * resulted in an error */
} backslashResult; } backslashResult;

View File

@ -18,7 +18,7 @@ enum slash_option_type
OT_SQLID, /* treat as SQL identifier */ OT_SQLID, /* treat as SQL identifier */
OT_SQLIDHACK, /* SQL identifier, but don't downcase */ OT_SQLIDHACK, /* SQL identifier, but don't downcase */
OT_FILEPIPE, /* it's a filename or pipe */ OT_FILEPIPE, /* it's a filename or pipe */
OT_WHOLE_LINE /* just snarf the rest of the line */ OT_WHOLE_LINE, /* just snarf the rest of the line */
}; };

View File

@ -37,21 +37,21 @@ typedef enum
PSQL_ECHO_NONE, PSQL_ECHO_NONE,
PSQL_ECHO_QUERIES, PSQL_ECHO_QUERIES,
PSQL_ECHO_ERRORS, PSQL_ECHO_ERRORS,
PSQL_ECHO_ALL PSQL_ECHO_ALL,
} PSQL_ECHO; } PSQL_ECHO;
typedef enum typedef enum
{ {
PSQL_ECHO_HIDDEN_OFF, PSQL_ECHO_HIDDEN_OFF,
PSQL_ECHO_HIDDEN_ON, PSQL_ECHO_HIDDEN_ON,
PSQL_ECHO_HIDDEN_NOEXEC PSQL_ECHO_HIDDEN_NOEXEC,
} PSQL_ECHO_HIDDEN; } PSQL_ECHO_HIDDEN;
typedef enum typedef enum
{ {
PSQL_ERROR_ROLLBACK_OFF, PSQL_ERROR_ROLLBACK_OFF,
PSQL_ERROR_ROLLBACK_INTERACTIVE, PSQL_ERROR_ROLLBACK_INTERACTIVE,
PSQL_ERROR_ROLLBACK_ON PSQL_ERROR_ROLLBACK_ON,
} PSQL_ERROR_ROLLBACK; } PSQL_ERROR_ROLLBACK;
typedef enum typedef enum
@ -59,7 +59,7 @@ typedef enum
PSQL_COMP_CASE_PRESERVE_UPPER, PSQL_COMP_CASE_PRESERVE_UPPER,
PSQL_COMP_CASE_PRESERVE_LOWER, PSQL_COMP_CASE_PRESERVE_LOWER,
PSQL_COMP_CASE_UPPER, PSQL_COMP_CASE_UPPER,
PSQL_COMP_CASE_LOWER PSQL_COMP_CASE_LOWER,
} PSQL_COMP_CASE; } PSQL_COMP_CASE;
typedef enum typedef enum
@ -67,14 +67,14 @@ typedef enum
hctl_none = 0, hctl_none = 0,
hctl_ignorespace = 1, hctl_ignorespace = 1,
hctl_ignoredups = 2, hctl_ignoredups = 2,
hctl_ignoreboth = hctl_ignorespace | hctl_ignoredups hctl_ignoreboth = hctl_ignorespace | hctl_ignoredups,
} HistControl; } HistControl;
enum trivalue enum trivalue
{ {
TRI_DEFAULT, TRI_DEFAULT,
TRI_NO, TRI_NO,
TRI_YES TRI_YES,
}; };
typedef struct _psqlSettings typedef struct _psqlSettings

View File

@ -47,7 +47,7 @@ enum _actions
{ {
ACT_SINGLE_QUERY, ACT_SINGLE_QUERY,
ACT_SINGLE_SLASH, ACT_SINGLE_SLASH,
ACT_FILE ACT_FILE,
}; };
typedef struct SimpleActionListCell typedef struct SimpleActionListCell

View File

@ -30,7 +30,7 @@ typedef enum ReindexType
REINDEX_INDEX, REINDEX_INDEX,
REINDEX_SCHEMA, REINDEX_SCHEMA,
REINDEX_SYSTEM, REINDEX_SYSTEM,
REINDEX_TABLE REINDEX_TABLE,
} ReindexType; } ReindexType;

View File

@ -57,7 +57,7 @@ typedef enum
OBJFILTER_DATABASE = (1 << 1), /* -d | --dbname */ OBJFILTER_DATABASE = (1 << 1), /* -d | --dbname */
OBJFILTER_TABLE = (1 << 2), /* -t | --table */ OBJFILTER_TABLE = (1 << 2), /* -t | --table */
OBJFILTER_SCHEMA = (1 << 3), /* -n | --schema */ OBJFILTER_SCHEMA = (1 << 3), /* -n | --schema */
OBJFILTER_SCHEMA_EXCLUDE = (1 << 4) /* -N | --exclude-schema */ OBJFILTER_SCHEMA_EXCLUDE = (1 << 4), /* -N | --exclude-schema */
} VacObjFilter; } VacObjFilter;
VacObjFilter objfilter = OBJFILTER_NONE; VacObjFilter objfilter = OBJFILTER_NONE;

View File

@ -44,7 +44,7 @@
typedef enum pg_cryptohash_errno typedef enum pg_cryptohash_errno
{ {
PG_CRYPTOHASH_ERROR_NONE = 0, PG_CRYPTOHASH_ERROR_NONE = 0,
PG_CRYPTOHASH_ERROR_DEST_LEN PG_CRYPTOHASH_ERROR_DEST_LEN,
} pg_cryptohash_errno; } pg_cryptohash_errno;
/* Internal pg_cryptohash_ctx structure */ /* Internal pg_cryptohash_ctx structure */

View File

@ -52,7 +52,7 @@ typedef enum pg_cryptohash_errno
{ {
PG_CRYPTOHASH_ERROR_NONE = 0, PG_CRYPTOHASH_ERROR_NONE = 0,
PG_CRYPTOHASH_ERROR_DEST_LEN, PG_CRYPTOHASH_ERROR_DEST_LEN,
PG_CRYPTOHASH_ERROR_OPENSSL PG_CRYPTOHASH_ERROR_OPENSSL,
} pg_cryptohash_errno; } pg_cryptohash_errno;
/* /*

View File

@ -43,7 +43,7 @@ typedef enum pg_hmac_errno
{ {
PG_HMAC_ERROR_NONE = 0, PG_HMAC_ERROR_NONE = 0,
PG_HMAC_ERROR_OOM, PG_HMAC_ERROR_OOM,
PG_HMAC_ERROR_INTERNAL PG_HMAC_ERROR_INTERNAL,
} pg_hmac_errno; } pg_hmac_errno;
/* Internal pg_hmac_ctx structure */ /* Internal pg_hmac_ctx structure */

View File

@ -57,7 +57,7 @@ typedef enum pg_hmac_errno
{ {
PG_HMAC_ERROR_NONE = 0, PG_HMAC_ERROR_NONE = 0,
PG_HMAC_ERROR_DEST_LEN, PG_HMAC_ERROR_DEST_LEN,
PG_HMAC_ERROR_OPENSSL PG_HMAC_ERROR_OPENSSL,
} pg_hmac_errno; } pg_hmac_errno;
/* Internal pg_hmac_ctx structure */ /* Internal pg_hmac_ctx structure */

View File

@ -40,7 +40,7 @@ typedef enum /* contexts of JSON parser */
JSON_PARSE_OBJECT_LABEL, /* saw object label, expecting ':' */ JSON_PARSE_OBJECT_LABEL, /* saw object label, expecting ':' */
JSON_PARSE_OBJECT_NEXT, /* saw object value, expecting ',' or '}' */ JSON_PARSE_OBJECT_NEXT, /* saw object value, expecting ',' or '}' */
JSON_PARSE_OBJECT_COMMA, /* saw object ',', expecting next label */ JSON_PARSE_OBJECT_COMMA, /* saw object ',', expecting next label */
JSON_PARSE_END /* saw the end of a document, expect nothing */ JSON_PARSE_END, /* saw the end of a document, expect nothing */
} JsonParseContext; } JsonParseContext;
static inline JsonParseErrorType json_lex_string(JsonLexContext *lex); static inline JsonParseErrorType json_lex_string(JsonLexContext *lex);

View File

@ -51,7 +51,7 @@ typedef enum IndexAMProperty
AMPROP_CAN_UNIQUE, AMPROP_CAN_UNIQUE,
AMPROP_CAN_MULTI_COL, AMPROP_CAN_MULTI_COL,
AMPROP_CAN_EXCLUDE, AMPROP_CAN_EXCLUDE,
AMPROP_CAN_INCLUDE AMPROP_CAN_INCLUDE,
} IndexAMProperty; } IndexAMProperty;
/* /*

View File

@ -117,7 +117,7 @@ typedef enum IndexUniqueCheck
UNIQUE_CHECK_NO, /* Don't do any uniqueness checking */ UNIQUE_CHECK_NO, /* Don't do any uniqueness checking */
UNIQUE_CHECK_YES, /* Enforce uniqueness at insertion time */ UNIQUE_CHECK_YES, /* Enforce uniqueness at insertion time */
UNIQUE_CHECK_PARTIAL, /* Test uniqueness, but no error */ UNIQUE_CHECK_PARTIAL, /* Test uniqueness, but no error */
UNIQUE_CHECK_EXISTING /* Check if existing tuple is unique */ UNIQUE_CHECK_EXISTING, /* Check if existing tuple is unique */
} IndexUniqueCheck; } IndexUniqueCheck;

View File

@ -143,7 +143,7 @@ typedef enum
{ {
GPTP_NO_WORK, GPTP_NO_WORK,
GPTP_INSERT, GPTP_INSERT,
GPTP_SPLIT GPTP_SPLIT,
} GinPlaceToPageRC; } GinPlaceToPageRC;
typedef struct GinBtreeData typedef struct GinBtreeData

View File

@ -385,7 +385,7 @@ typedef enum GistOptBufferingMode
{ {
GIST_OPTION_BUFFERING_AUTO, GIST_OPTION_BUFFERING_AUTO,
GIST_OPTION_BUFFERING_ON, GIST_OPTION_BUFFERING_ON,
GIST_OPTION_BUFFERING_OFF GIST_OPTION_BUFFERING_OFF,
} GistOptBufferingMode; } GistOptBufferingMode;
/* /*

View File

@ -97,7 +97,7 @@ typedef enum
HEAPTUPLE_LIVE, /* tuple is live (committed, no deleter) */ HEAPTUPLE_LIVE, /* tuple is live (committed, no deleter) */
HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */
HEAPTUPLE_INSERT_IN_PROGRESS, /* inserting xact is still in progress */ HEAPTUPLE_INSERT_IN_PROGRESS, /* inserting xact is still in progress */
HEAPTUPLE_DELETE_IN_PROGRESS /* deleting xact is still in progress */ HEAPTUPLE_DELETE_IN_PROGRESS, /* deleting xact is still in progress */
} HTSV_Result; } HTSV_Result;
/* /*

View File

@ -47,7 +47,7 @@ typedef enum
/* an update that doesn't touch "key" columns */ /* an update that doesn't touch "key" columns */
MultiXactStatusNoKeyUpdate = 0x04, MultiXactStatusNoKeyUpdate = 0x04,
/* other updates, and delete */ /* other updates, and delete */
MultiXactStatusUpdate = 0x05 MultiXactStatusUpdate = 0x05,
} MultiXactStatus; } MultiXactStatus;
#define MaxMultiXactStatus MultiXactStatusUpdate #define MaxMultiXactStatus MultiXactStatusUpdate

View File

@ -32,7 +32,7 @@ typedef enum relopt_type
RELOPT_TYPE_INT, RELOPT_TYPE_INT,
RELOPT_TYPE_REAL, RELOPT_TYPE_REAL,
RELOPT_TYPE_ENUM, RELOPT_TYPE_ENUM,
RELOPT_TYPE_STRING RELOPT_TYPE_STRING,
} relopt_type; } relopt_type;
/* kinds supported by reloptions */ /* kinds supported by reloptions */

View File

@ -44,7 +44,7 @@ typedef enum
SLRU_PAGE_EMPTY, /* buffer is not in use */ SLRU_PAGE_EMPTY, /* buffer is not in use */
SLRU_PAGE_READ_IN_PROGRESS, /* page is being read in */ SLRU_PAGE_READ_IN_PROGRESS, /* page is being read in */
SLRU_PAGE_VALID, /* page is valid and not being written */ SLRU_PAGE_VALID, /* page is valid and not being written */
SLRU_PAGE_WRITE_IN_PROGRESS /* page is being written out */ SLRU_PAGE_WRITE_IN_PROGRESS, /* page is being written out */
} SlruPageStatus; } SlruPageStatus;
/* /*

View File

@ -68,7 +68,7 @@ typedef enum spgChooseResultType
{ {
spgMatchNode = 1, /* descend into existing node */ spgMatchNode = 1, /* descend into existing node */
spgAddNode, /* add a node to the inner tuple */ spgAddNode, /* add a node to the inner tuple */
spgSplitTuple /* split inner tuple (change its prefix) */ spgSplitTuple, /* split inner tuple (change its prefix) */
} spgChooseResultType; } spgChooseResultType;
typedef struct spgChooseOut typedef struct spgChooseOut

View File

@ -61,8 +61,8 @@ typedef enum ScanOptions
SO_ALLOW_PAGEMODE = 1 << 8, SO_ALLOW_PAGEMODE = 1 << 8,
/* unregister snapshot at scan end? */ /* unregister snapshot at scan end? */
SO_TEMP_SNAPSHOT = 1 << 9 SO_TEMP_SNAPSHOT = 1 << 9,
} ScanOptions; } ScanOptions;
/* /*
* Result codes for table_{update,delete,lock_tuple}, and for visibility * Result codes for table_{update,delete,lock_tuple}, and for visibility
@ -99,7 +99,7 @@ typedef enum TM_Result
TM_BeingModified, TM_BeingModified,
/* lock couldn't be acquired, action skipped. Only used by lock_tuple */ /* lock couldn't be acquired, action skipped. Only used by lock_tuple */
TM_WouldBlock TM_WouldBlock,
} TM_Result; } TM_Result;
/* /*
@ -115,7 +115,7 @@ typedef enum TU_UpdateIndexes
TU_All, TU_All,
/* Only summarized columns were updated, TID is unchanged */ /* Only summarized columns were updated, TID is unchanged */
TU_Summarizing TU_Summarizing,
} TU_UpdateIndexes; } TU_UpdateIndexes;
/* /*

View File

@ -38,7 +38,7 @@ typedef enum ToastCompressionId
{ {
TOAST_PGLZ_COMPRESSION_ID = 0, TOAST_PGLZ_COMPRESSION_ID = 0,
TOAST_LZ4_COMPRESSION_ID = 1, TOAST_LZ4_COMPRESSION_ID = 1,
TOAST_INVALID_COMPRESSION_ID = 2 TOAST_INVALID_COMPRESSION_ID = 2,
} ToastCompressionId; } ToastCompressionId;
/* /*

View File

@ -72,8 +72,8 @@ typedef enum
SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote
* write */ * write */
SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */ SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */
SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local and remote flush and SYNCHRONOUS_COMMIT_REMOTE_APPLY, /* wait for local and remote flush and
* remote apply */ * remote apply */
} SyncCommitLevel; } SyncCommitLevel;
/* Define the default setting for synchronous_commit */ /* Define the default setting for synchronous_commit */
@ -132,7 +132,7 @@ typedef enum
XACT_EVENT_PREPARE, XACT_EVENT_PREPARE,
XACT_EVENT_PRE_COMMIT, XACT_EVENT_PRE_COMMIT,
XACT_EVENT_PARALLEL_PRE_COMMIT, XACT_EVENT_PARALLEL_PRE_COMMIT,
XACT_EVENT_PRE_PREPARE XACT_EVENT_PRE_PREPARE,
} XactEvent; } XactEvent;
typedef void (*XactCallback) (XactEvent event, void *arg); typedef void (*XactCallback) (XactEvent event, void *arg);
@ -142,7 +142,7 @@ typedef enum
SUBXACT_EVENT_START_SUB, SUBXACT_EVENT_START_SUB,
SUBXACT_EVENT_COMMIT_SUB, SUBXACT_EVENT_COMMIT_SUB,
SUBXACT_EVENT_ABORT_SUB, SUBXACT_EVENT_ABORT_SUB,
SUBXACT_EVENT_PRE_COMMIT_SUB SUBXACT_EVENT_PRE_COMMIT_SUB,
} SubXactEvent; } SubXactEvent;
typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid, typedef void (*SubXactCallback) (SubXactEvent event, SubTransactionId mySubid,

View File

@ -62,7 +62,7 @@ typedef enum ArchiveMode
{ {
ARCHIVE_MODE_OFF = 0, /* disabled */ ARCHIVE_MODE_OFF = 0, /* disabled */
ARCHIVE_MODE_ON, /* enabled while server is running normally */ ARCHIVE_MODE_ON, /* enabled while server is running normally */
ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */ ARCHIVE_MODE_ALWAYS, /* enabled always (even during recovery) */
} ArchiveMode; } ArchiveMode;
extern PGDLLIMPORT int XLogArchiveMode; extern PGDLLIMPORT int XLogArchiveMode;
@ -71,7 +71,7 @@ typedef enum WalLevel
{ {
WAL_LEVEL_MINIMAL = 0, WAL_LEVEL_MINIMAL = 0,
WAL_LEVEL_REPLICA, WAL_LEVEL_REPLICA,
WAL_LEVEL_LOGICAL WAL_LEVEL_LOGICAL,
} WalLevel; } WalLevel;
/* Compression algorithms for WAL */ /* Compression algorithms for WAL */
@ -80,7 +80,7 @@ typedef enum WalCompression
WAL_COMPRESSION_NONE = 0, WAL_COMPRESSION_NONE = 0,
WAL_COMPRESSION_PGLZ, WAL_COMPRESSION_PGLZ,
WAL_COMPRESSION_LZ4, WAL_COMPRESSION_LZ4,
WAL_COMPRESSION_ZSTD WAL_COMPRESSION_ZSTD,
} WalCompression; } WalCompression;
/* Recovery states */ /* Recovery states */
@ -88,7 +88,7 @@ typedef enum RecoveryState
{ {
RECOVERY_STATE_CRASH = 0, /* crash recovery */ RECOVERY_STATE_CRASH = 0, /* crash recovery */
RECOVERY_STATE_ARCHIVE, /* archive recovery */ RECOVERY_STATE_ARCHIVE, /* archive recovery */
RECOVERY_STATE_DONE /* currently in production */ RECOVERY_STATE_DONE, /* currently in production */
} RecoveryState; } RecoveryState;
extern PGDLLIMPORT int wal_level; extern PGDLLIMPORT int wal_level;
@ -190,7 +190,7 @@ typedef enum WALAvailability
WALAVAIL_EXTENDED, /* WAL segment is reserved by a slot or WALAVAIL_EXTENDED, /* WAL segment is reserved by a slot or
* wal_keep_size */ * wal_keep_size */
WALAVAIL_UNRESERVED, /* no longer reserved, but not removed yet */ WALAVAIL_UNRESERVED, /* no longer reserved, but not removed yet */
WALAVAIL_REMOVED /* WAL segment has been removed */ WALAVAIL_REMOVED, /* WAL segment has been removed */
} WALAvailability; } WALAvailability;
struct XLogRecData; struct XLogRecData;

Some files were not shown because too many files have changed in this diff Show More