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_PRECEDES_CLUSTERMIN,
XID_PRECEDES_RELMIN,
XID_BOUNDS_OK
XID_BOUNDS_OK,
} XidBoundsViolation;
typedef enum XidCommitStatus
@ -51,14 +51,14 @@ typedef enum XidCommitStatus
XID_COMMITTED,
XID_IS_CURRENT_XID,
XID_IN_PROGRESS,
XID_ABORTED
XID_ABORTED,
} XidCommitStatus;
typedef enum SkipPages
{
SKIP_PAGES_ALL_FROZEN,
SKIP_PAGES_ALL_VISIBLE,
SKIP_PAGES_NONE
SKIP_PAGES_NONE,
} SkipPages;
/*

View File

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

View File

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

View File

@ -118,7 +118,7 @@ typedef enum pgssVersion
PGSS_V1_8,
PGSS_V1_9,
PGSS_V1_10,
PGSS_V1_11
PGSS_V1_11,
} pgssVersion;
typedef enum pgssStoreKind
@ -282,7 +282,7 @@ typedef enum
{
PGSS_TRACK_NONE, /* track no 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;
static const struct config_enum_entry track_options[] =

View File

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

View File

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

View File

@ -83,7 +83,7 @@ typedef enum
* it has default collation that is not
* traceable to 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 */
} FDWCollateState;

View File

@ -82,7 +82,7 @@ enum FdwScanPrivateIndex
* String describing join i.e. names of relations being joined and types
* of join, added when the scan is join
*/
FdwScanPrivateRelations
FdwScanPrivateRelations,
};
/*
@ -108,7 +108,7 @@ enum FdwModifyPrivateIndex
/* has-returning flag (as a Boolean node) */
FdwModifyPrivateHasReturning,
/* Integer list of attribute numbers retrieved by RETURNING */
FdwModifyPrivateRetrievedAttrs
FdwModifyPrivateRetrievedAttrs,
};
/*
@ -129,7 +129,7 @@ enum FdwDirectModifyPrivateIndex
/* Integer list of attribute numbers retrieved by RETURNING */
FdwDirectModifyPrivateRetrievedAttrs,
/* set-processed flag (as a Boolean node) */
FdwDirectModifyPrivateSetProcessed
FdwDirectModifyPrivateSetProcessed,
};
/*
@ -285,7 +285,7 @@ enum FdwPathPrivateIndex
/* has-final-sort flag (as a Boolean node) */
FdwPathPrivateHasFinalSort,
/* has-limit flag (as a Boolean node) */
FdwPathPrivateHasLimit
FdwPathPrivateHasLimit,
};
/* 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_RANDOM, /* remote random() */
ANALYZE_SAMPLE_SYSTEM, /* TABLESAMPLE system */
ANALYZE_SAMPLE_BERNOULLI /* TABLESAMPLE bernoulli */
ANALYZE_SAMPLE_BERNOULLI, /* TABLESAMPLE bernoulli */
} PgFdwSamplingMethod;
/* in postgres_fdw.c */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -145,7 +145,7 @@ typedef enum TransState
TRANS_INPROGRESS, /* inside a valid transaction */
TRANS_COMMIT, /* commit in progress */
TRANS_ABORT, /* abort in progress */
TRANS_PREPARE /* prepare in progress */
TRANS_PREPARE, /* prepare in progress */
} TransState;
/*
@ -180,7 +180,7 @@ typedef enum TBlockState
TBLOCK_SUBABORT_END, /* failed subxact, ROLLBACK received */
TBLOCK_SUBABORT_PENDING, /* live subxact, ROLLBACK 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;
/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -145,7 +145,7 @@ typedef enum
{
MJEVAL_MATCHABLE, /* normal, potentially matchable tuple */
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;

View File

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

View File

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

View File

@ -129,7 +129,7 @@ typedef enum
{
TBM_EMPTY, /* no hashtable, nentries == 0 */
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;
/*
@ -139,7 +139,7 @@ typedef enum
{
TBM_NOT_ITERATING, /* not yet converted to 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;
/*

View File

@ -74,7 +74,7 @@ typedef enum pushdown_safe_type
{
PUSHDOWN_UNSAFE, /* unsafe 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 */
} pushdown_safe_type;

View File

@ -45,7 +45,7 @@ typedef enum
{
ST_INDEXSCAN, /* must support amgettuple */
ST_BITMAPSCAN, /* must support amgetbitmap */
ST_ANYSCAN /* either is okay */
ST_ANYSCAN, /* either is okay */
} ScanTypeControl;
/* 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_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;
typedef struct

View File

@ -40,7 +40,7 @@ typedef enum
COSTS_EQUAL, /* path costs are fuzzily equal */
COSTS_BETTER1, /* first path is cheaper than second */
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;
/*

View File

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

View File

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

View File

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

View File

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

View File

@ -82,7 +82,7 @@ typedef enum PartClauseMatchStatus
PARTCLAUSE_MATCH_NULLNESS,
PARTCLAUSE_MATCH_STEPS,
PARTCLAUSE_MATCH_CONTRADICT,
PARTCLAUSE_UNSUPPORTED
PARTCLAUSE_UNSUPPORTED,
} PartClauseMatchStatus;
/*
@ -93,7 +93,7 @@ typedef enum PartClauseTarget
{
PARTTARGET_PLANNER, /* want to prune during planning */
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;
/*

View File

@ -86,7 +86,7 @@ typedef enum
SHMSTATE_ATTACHED, /* pertinent to DataDir, has attached PIDs */
SHMSTATE_ENOENT, /* no segment of that ID */
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;

View File

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

View File

@ -262,7 +262,7 @@ typedef enum
STARTUP_NOT_RUNNING,
STARTUP_RUNNING,
STARTUP_SIGNALED, /* we sent it a SIGQUIT or SIGKILL */
STARTUP_CRASHED
STARTUP_CRASHED,
} StartupStatusEnum;
static StartupStatusEnum StartupStatus = STARTUP_NOT_RUNNING;
@ -332,7 +332,7 @@ typedef enum
PM_SHUTDOWN_2, /* waiting for archiver and walsenders to
* finish */
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;
static PMState pmState = PM_INIT;

View File

@ -68,7 +68,7 @@ typedef enum
PG_REGEX_LOCALE_1BYTE, /* Use <ctype.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_ICU /* Use ICU uchar.h functions */
PG_REGEX_LOCALE_ICU, /* Use ICU uchar.h functions */
} PG_Locale_Strategy;
static PG_Locale_Strategy pg_regex_strategy;

View File

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

View File

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

View File

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

View File

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

View File

@ -252,7 +252,7 @@ typedef enum GlobalVisHorizonKind
VISHORIZON_SHARED,
VISHORIZON_CATALOG,
VISHORIZON_DATA,
VISHORIZON_TEMP
VISHORIZON_TEMP,
} GlobalVisHorizonKind;
/*
@ -263,7 +263,7 @@ typedef enum KAXCompressReason
KAX_NO_SPACE, /* need to free up space at array end */
KAX_PRUNE, /* we just pruned old entries */
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;

View File

@ -63,7 +63,7 @@ typedef enum
ARRAY_QUOTED_ELEM_COMPLETED,
ARRAY_ELEM_DELIMITED,
ARRAY_LEVEL_COMPLETED,
ARRAY_LEVEL_DELIMITED
ARRAY_LEVEL_DELIMITED,
} ArrayParseState;
/* 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_GREGORIAN, /* Gregorian (day, month, year) style date */
FROM_CHAR_DATE_ISOWEEK /* ISO 8601 week date */
FROM_CHAR_DATE_ISOWEEK, /* ISO 8601 week date */
} FromCharDateMode;
typedef struct

View File

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

View File

@ -201,7 +201,7 @@ typedef enum TypeCat
TYPECAT_ARRAY = 'a',
TYPECAT_COMPOSITE = 'c',
TYPECAT_COMPOSITE_DOMAIN = 'C',
TYPECAT_DOMAIN = 'd'
TYPECAT_DOMAIN = 'd',
} TypeCat;
/* 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_Regex,
Pattern_Type_Regex_IC,
Pattern_Type_Prefix
Pattern_Type_Prefix,
} Pattern_Type;
typedef enum
{
Pattern_Prefix_None, Pattern_Prefix_Partial, Pattern_Prefix_Exact
Pattern_Prefix_None, Pattern_Prefix_Partial, Pattern_Prefix_Exact,
} Pattern_Prefix_Status;
static Node *like_regex_support(Node *rawreq, Pattern_Type ptype);

View File

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

View File

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

View File

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

View File

@ -162,7 +162,7 @@ typedef enum
TSS_BUILDRUNS, /* Loading tuples; writing to tape */
TSS_SORTEDINMEM, /* Sort completed entirely in memory */
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;
/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -113,7 +113,7 @@ struct ParallelState;
typedef enum T_Action
{
ACT_DUMP,
ACT_RESTORE
ACT_RESTORE,
} T_Action;
typedef void (*ClosePtrType) (ArchiveHandle *AH);
@ -151,7 +151,7 @@ typedef enum
{
SQL_SCAN = 0, /* normal */
SQL_IN_SINGLE_QUOTE, /* '...' literal */
SQL_IN_DOUBLE_QUOTE /* "..." identifier */
SQL_IN_DOUBLE_QUOTE, /* "..." identifier */
} sqlparseState;
typedef struct
@ -166,14 +166,14 @@ typedef enum
STAGE_NONE = 0,
STAGE_INITIALIZING,
STAGE_PROCESSING,
STAGE_FINALIZING
STAGE_FINALIZING,
} ArchiverStage;
typedef enum
{
OUTPUT_SQLCMDS = 0, /* emitting general SQL commands */
OUTPUT_COPYDATA, /* writing COPY data */
OUTPUT_OTHERDATA /* writing data as INSERT commands */
OUTPUT_OTHERDATA, /* writing data as INSERT commands */
} ArchiverOutput;
/*
@ -199,7 +199,7 @@ typedef enum
{
RESTORE_PASS_MAIN = 0, /* Main pass (most TOC 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
} RestorePass;

View File

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

View File

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

View File

@ -24,7 +24,7 @@ typedef enum
FILE_ACTION_NONE, /* no action (we might still copy modified
* blocks based on the parsed WAL) */
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;
typedef enum
@ -33,7 +33,7 @@ typedef enum
FILE_TYPE_REGULAR,
FILE_TYPE_DIRECTORY,
FILE_TYPE_SYMLINK
FILE_TYPE_SYMLINK,
} file_type_t;
/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@ typedef enum _backslashResult
PSQL_CMD_SKIP_LINE, /* keep building query */
PSQL_CMD_TERMINATE, /* quit program */
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 */
} backslashResult;

View File

@ -18,7 +18,7 @@ enum slash_option_type
OT_SQLID, /* treat as SQL identifier */
OT_SQLIDHACK, /* SQL identifier, but don't downcase */
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_QUERIES,
PSQL_ECHO_ERRORS,
PSQL_ECHO_ALL
PSQL_ECHO_ALL,
} PSQL_ECHO;
typedef enum
{
PSQL_ECHO_HIDDEN_OFF,
PSQL_ECHO_HIDDEN_ON,
PSQL_ECHO_HIDDEN_NOEXEC
PSQL_ECHO_HIDDEN_NOEXEC,
} PSQL_ECHO_HIDDEN;
typedef enum
{
PSQL_ERROR_ROLLBACK_OFF,
PSQL_ERROR_ROLLBACK_INTERACTIVE,
PSQL_ERROR_ROLLBACK_ON
PSQL_ERROR_ROLLBACK_ON,
} PSQL_ERROR_ROLLBACK;
typedef enum
@ -59,7 +59,7 @@ typedef enum
PSQL_COMP_CASE_PRESERVE_UPPER,
PSQL_COMP_CASE_PRESERVE_LOWER,
PSQL_COMP_CASE_UPPER,
PSQL_COMP_CASE_LOWER
PSQL_COMP_CASE_LOWER,
} PSQL_COMP_CASE;
typedef enum
@ -67,14 +67,14 @@ typedef enum
hctl_none = 0,
hctl_ignorespace = 1,
hctl_ignoredups = 2,
hctl_ignoreboth = hctl_ignorespace | hctl_ignoredups
hctl_ignoreboth = hctl_ignorespace | hctl_ignoredups,
} HistControl;
enum trivalue
{
TRI_DEFAULT,
TRI_NO,
TRI_YES
TRI_YES,
};
typedef struct _psqlSettings

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -57,7 +57,7 @@ typedef enum pg_hmac_errno
{
PG_HMAC_ERROR_NONE = 0,
PG_HMAC_ERROR_DEST_LEN,
PG_HMAC_ERROR_OPENSSL
PG_HMAC_ERROR_OPENSSL,
} pg_hmac_errno;
/* 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_NEXT, /* saw object value, expecting ',' or '}' */
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;
static inline JsonParseErrorType json_lex_string(JsonLexContext *lex);

View File

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

View File

@ -117,7 +117,7 @@ typedef enum IndexUniqueCheck
UNIQUE_CHECK_NO, /* Don't do any uniqueness checking */
UNIQUE_CHECK_YES, /* Enforce uniqueness at insertion time */
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;

View File

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

View File

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

View File

@ -97,7 +97,7 @@ typedef enum
HEAPTUPLE_LIVE, /* tuple is live (committed, no deleter) */
HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */
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;
/*

View File

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

View File

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

View File

@ -44,7 +44,7 @@ typedef enum
SLRU_PAGE_EMPTY, /* buffer is not in use */
SLRU_PAGE_READ_IN_PROGRESS, /* page is being read in */
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;
/*

View File

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

View File

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

View File

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

View File

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

View File

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

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