1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Initial pgindent run for v12.

This is still using the 2.0 version of pg_bsd_indent.
I thought it would be good to commit this separately,
so as to document the differences between 2.0 and 2.1 behavior.

Discussion: https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2019-05-22 12:55:34 -04:00
parent 66a4bad83a
commit be76af171c
221 changed files with 1433 additions and 1302 deletions

View File

@@ -216,7 +216,7 @@ typedef struct IndexAmRoutine
amcostestimate_function amcostestimate;
amoptions_function amoptions;
amproperty_function amproperty; /* can be NULL */
ambuildphasename_function ambuildphasename; /* can be NULL */
ambuildphasename_function ambuildphasename; /* can be NULL */
amvalidate_function amvalidate;
ambeginscan_function ambeginscan;
amrescan_function amrescan;

View File

@@ -18,9 +18,10 @@
#include "lib/stringinfo.h"
#define XLOG_GIST_PAGE_UPDATE 0x00
#define XLOG_GIST_DELETE 0x10 /* delete leaf index tuples for a page */
#define XLOG_GIST_PAGE_REUSE 0x20 /* old page is about to be reused from
* FSM */
#define XLOG_GIST_DELETE 0x10 /* delete leaf index tuples for a
* page */
#define XLOG_GIST_PAGE_REUSE 0x20 /* old page is about to be reused
* from FSM */
#define XLOG_GIST_PAGE_SPLIT 0x30
/* #define XLOG_GIST_INSERT_COMPLETE 0x40 */ /* not used anymore */
/* #define XLOG_GIST_CREATE_INDEX 0x50 */ /* not used anymore */
@@ -83,7 +84,8 @@ typedef struct gistxlogPageSplit
typedef struct gistxlogPageDelete
{
TransactionId deleteXid; /* last Xid which could see page in scan */
OffsetNumber downlinkOffset; /* Offset of downlink referencing this page */
OffsetNumber downlinkOffset; /* Offset of downlink referencing this
* page */
} gistxlogPageDelete;
#define SizeOfGistxlogPageDelete (offsetof(gistxlogPageDelete, downlinkOffset) + sizeof(OffsetNumber))

View File

@@ -31,7 +31,7 @@ typedef struct BulkInsertStateData
{
BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
Buffer current_buf; /* current insertion target page */
} BulkInsertStateData;
} BulkInsertStateData;
extern void RelationPutHeapTuple(Relation relation, Buffer buffer,

View File

@@ -78,7 +78,7 @@ typedef struct ParallelBlockTableScanDescData
BlockNumber phs_startblock; /* starting block number */
pg_atomic_uint64 phs_nallocated; /* number of blocks allocated to
* workers so far. */
} ParallelBlockTableScanDescData;
} ParallelBlockTableScanDescData;
typedef struct ParallelBlockTableScanDescData *ParallelBlockTableScanDesc;
/*

View File

@@ -146,7 +146,7 @@ typedef struct SpGistSearchItem
/* array with numberOfOrderBys entries */
double distances[FLEXIBLE_ARRAY_MEMBER];
} SpGistSearchItem;
} SpGistSearchItem;
#define SizeOfSpGistSearchItem(n_distances) \
(offsetof(SpGistSearchItem, distances) + sizeof(double) * (n_distances))

View File

@@ -18,7 +18,7 @@
#include "storage/off.h"
/* XLOG record types for SPGiST */
/* #define XLOG_SPGIST_CREATE_INDEX 0x00 */ /* not used anymore */
/* #define XLOG_SPGIST_CREATE_INDEX 0x00 */ /* not used anymore */
#define XLOG_SPGIST_ADD_LEAF 0x10
#define XLOG_SPGIST_MOVE_LEAFS 0x20
#define XLOG_SPGIST_ADD_NODE 0x30

View File

@@ -45,21 +45,21 @@ struct ValidateIndexState;
typedef enum ScanOptions
{
/* one of SO_TYPE_* may be specified */
SO_TYPE_SEQSCAN = 1 << 0,
SO_TYPE_BITMAPSCAN = 1 << 1,
SO_TYPE_SAMPLESCAN = 1 << 2,
SO_TYPE_ANALYZE = 1 << 3,
SO_TYPE_SEQSCAN = 1 << 0,
SO_TYPE_BITMAPSCAN = 1 << 1,
SO_TYPE_SAMPLESCAN = 1 << 2,
SO_TYPE_ANALYZE = 1 << 3,
/* several of SO_ALLOW_* may be specified */
/* allow or disallow use of access strategy */
SO_ALLOW_STRAT = 1 << 4,
SO_ALLOW_STRAT = 1 << 4,
/* report location to syncscan logic? */
SO_ALLOW_SYNC = 1 << 5,
SO_ALLOW_SYNC = 1 << 5,
/* verify visibility page-at-a-time? */
SO_ALLOW_PAGEMODE = 1 << 6,
SO_ALLOW_PAGEMODE = 1 << 6,
/* unregister snapshot at scan end? */
SO_TEMP_SNAPSHOT = 1 << 7
SO_TEMP_SNAPSHOT = 1 << 7
} ScanOptions;
/*
@@ -575,12 +575,12 @@ typedef struct TableAmRoutine
/*
* This callback should return true if the relation requires a TOAST table
* and false if it does not. It may wish to examine the relation's
* tuple descriptor before making a decision, but if it uses some other
* method of storing large values (or if it does not support them) it can
* simply return false.
* and false if it does not. It may wish to examine the relation's tuple
* descriptor before making a decision, but if it uses some other method
* of storing large values (or if it does not support them) it can simply
* return false.
*/
bool (*relation_needs_toast_table) (Relation rel);
bool (*relation_needs_toast_table) (Relation rel);
/* ------------------------------------------------------------------------
@@ -738,7 +738,7 @@ table_beginscan(Relation rel, Snapshot snapshot,
int nkeys, struct ScanKeyData *key)
{
uint32 flags = SO_TYPE_SEQSCAN |
SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE;
SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE;
return rel->rd_tableam->scan_begin(rel, snapshot, nkeys, key, NULL, flags);
}

View File

@@ -38,7 +38,7 @@ typedef struct TupleConstr
{
AttrDefault *defval; /* array */
ConstrCheck *check; /* array */
struct AttrMissing *missing; /* missing attributes values, NULL if none */
struct AttrMissing *missing; /* missing attributes values, NULL if none */
uint16 num_defval;
uint16 num_check;
bool has_not_null;
@@ -85,7 +85,7 @@ typedef struct TupleDescData
TupleConstr *constr; /* constraints, or NULL if none */
/* attrs[N] is the description of Attribute Number N+1 */
FormData_pg_attribute attrs[FLEXIBLE_ARRAY_MEMBER];
} TupleDescData;
} TupleDescData;
typedef struct TupleDescData *TupleDesc;
/* Accessor for the i'th attribute of tupdesc. */

View File

@@ -95,7 +95,7 @@ typedef enum
RECOVERY_TARGET_TIMELINE_CONTROLFILE,
RECOVERY_TARGET_TIMELINE_LATEST,
RECOVERY_TARGET_TIMELINE_NUMERIC
} RecoveryTargetTimeLineGoal;
} RecoveryTargetTimeLineGoal;
extern XLogRecPtr ProcLastRecPtr;
extern XLogRecPtr XactLastRecEnd;

View File

@@ -268,7 +268,7 @@ typedef enum
RECOVERY_TARGET_ACTION_PAUSE,
RECOVERY_TARGET_ACTION_PROMOTE,
RECOVERY_TARGET_ACTION_SHUTDOWN
} RecoveryTargetAction;
} RecoveryTargetAction;
/*
* Method table for resource managers.

View File

@@ -136,7 +136,8 @@ typedef enum ObjectClass
#define PERFORM_DELETION_QUIETLY 0x0004 /* suppress notices */
#define PERFORM_DELETION_SKIP_ORIGINAL 0x0008 /* keep original obj */
#define PERFORM_DELETION_SKIP_EXTENSIONS 0x0010 /* keep extensions */
#define PERFORM_DELETION_CONCURRENT_LOCK 0x0020 /* normal drop with concurrent lock mode */
#define PERFORM_DELETION_CONCURRENT_LOCK 0x0020 /* normal drop with
* concurrent lock mode */
/* in dependency.c */
@@ -200,10 +201,10 @@ extern long changeDependencyFor(Oid classId, Oid objectId,
Oid newRefObjectId);
extern long changeDependenciesOf(Oid classId, Oid oldObjectId,
Oid newObjectId);
Oid newObjectId);
extern long changeDependenciesOn(Oid refClassId, Oid oldRefObjectId,
Oid newRefObjectId);
Oid newRefObjectId);
extern Oid getExtensionOfObject(Oid classId, Oid objectId);

View File

@@ -79,18 +79,18 @@ extern Oid index_create(Relation heapRelation,
#define INDEX_CONSTR_CREATE_REMOVE_OLD_DEPS (1 << 4)
extern Oid index_concurrently_create_copy(Relation heapRelation,
Oid oldIndexId,
const char *newName);
Oid oldIndexId,
const char *newName);
extern void index_concurrently_build(Oid heapRelationId,
Oid indexRelationId);
Oid indexRelationId);
extern void index_concurrently_swap(Oid newIndexId,
Oid oldIndexId,
const char *oldName);
Oid oldIndexId,
const char *oldName);
extern void index_concurrently_set_dead(Oid heapId,
Oid indexId);
Oid indexId);
extern ObjectAddress index_constraint_create(Relation heapRelation,
Oid indexRelationId,

View File

@@ -34,7 +34,8 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
int16 adnum; /* attnum of attribute */
#ifdef CATALOG_VARLEN /* variable-length fields start here */
pg_node_tree adbin BKI_FORCE_NOT_NULL; /* nodeToString representation of default */
pg_node_tree adbin BKI_FORCE_NOT_NULL; /* nodeToString representation of
* default */
#endif
} FormData_pg_attrdef;

View File

@@ -35,7 +35,8 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId)
char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
#ifdef CATALOG_VARLEN /* variable-length fields start here */
aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at CREATE time */
aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at
* CREATE time */
#endif
} FormData_pg_default_acl;

View File

@@ -35,7 +35,8 @@ CATALOG(pg_policy,3256,PolicyRelationId)
bool polpermissive; /* restrictive or permissive policy */
#ifdef CATALOG_VARLEN
Oid polroles[1] BKI_FORCE_NOT_NULL; /* Roles associated with policy */
Oid polroles[1] BKI_FORCE_NOT_NULL; /* Roles associated with
* policy */
pg_node_tree polqual; /* Policy quals. */
pg_node_tree polwithcheck; /* WITH CHECK quals. */
#endif

View File

@@ -24,7 +24,7 @@ extern void RelationDropStorage(Relation rel);
extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
extern void RelationTruncate(Relation rel, BlockNumber nblocks);
extern void RelationCopyStorage(SMgrRelation src, SMgrRelation dst,
ForkNumber forkNum, char relpersistence);
ForkNumber forkNum, char relpersistence);
/*
* These functions used to be in storage/smgr/smgr.c, which explains the

View File

@@ -94,7 +94,7 @@ extern void UpdateStatisticsForTypeChange(Oid statsOid,
/* commands/aggregatecmds.c */
extern ObjectAddress DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle,
List *parameters, bool replace);
List *parameters, bool replace);
/* commands/opclasscmds.c */
extern ObjectAddress DefineOpClass(CreateOpClassStmt *stmt);

View File

@@ -79,7 +79,7 @@ typedef struct TransitionCaptureState
* and allow the inserting code (copy.c and nodeModifyTable.c) to provide
* a slot containing the original tuple directly.
*/
TupleTableSlot *tcs_original_insert_tuple;
TupleTableSlot *tcs_original_insert_tuple;
/*
* Private data including the tuplestore(s) into which to insert tuples.
@@ -260,7 +260,7 @@ extern bool AfterTriggerPendingOnRel(Oid relid);
extern bool RI_FKey_pk_upd_check_required(Trigger *trigger, Relation pk_rel,
TupleTableSlot *old_slot, TupleTableSlot *new_slot);
extern bool RI_FKey_fk_upd_check_required(Trigger *trigger, Relation fk_rel,
TupleTableSlot *old_slot, TupleTableSlot *new_slot);
TupleTableSlot *old_slot, TupleTableSlot *new_slot);
extern bool RI_Initial_Check(Trigger *trigger,
Relation fk_rel, Relation pk_rel);
extern void RI_PartitionRemove_Check(Trigger *trigger, Relation fk_rel,

View File

@@ -181,9 +181,9 @@ typedef struct VacuumParams
* which verbose logs are activated, -1
* to use default */
VacOptTernaryValue index_cleanup; /* Do index vacuum and cleanup,
* default value depends on reloptions */
* default value depends on reloptions */
VacOptTernaryValue truncate; /* Truncate empty pages at the end,
* default value depends on reloptions */
* default value depends on reloptions */
} VacuumParams;
/* GUC parameters */

View File

@@ -15,10 +15,10 @@
#ifndef FILE_UTILS_H
#define FILE_UTILS_H
extern int fsync_fname(const char *fname, bool isdir);
extern int fsync_fname(const char *fname, bool isdir);
extern void fsync_pgdata(const char *pg_data, int serverVersion);
extern void fsync_dir_recurse(const char *dir);
extern int durable_rename(const char *oldfile, const char *newfile);
extern int durable_rename(const char *oldfile, const char *newfile);
extern int fsync_parent_path(const char *fname);
#endif /* FILE_UTILS_H */

View File

@@ -63,14 +63,14 @@ extern enum pg_log_level __pg_log_level;
*/
#define PG_LOG_FLAG_TERSE 1
void pg_logging_init(const char *argv0);
void pg_logging_config(int new_flags);
void pg_logging_set_level(enum pg_log_level new_level);
void pg_logging_set_pre_callback(void (*cb)(void));
void pg_logging_set_locus_callback(void (*cb)(const char **filename, uint64 *lineno));
void pg_logging_init(const char *argv0);
void pg_logging_config(int new_flags);
void pg_logging_set_level(enum pg_log_level new_level);
void pg_logging_set_pre_callback(void (*cb) (void));
void pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno));
void pg_log_generic(enum pg_log_level level, const char * pg_restrict fmt, ...) pg_attribute_printf(2, 3);
void pg_log_generic_v(enum pg_log_level level, const char * pg_restrict fmt, va_list ap) pg_attribute_printf(2, 0);
void pg_log_generic(enum pg_log_level level, const char *pg_restrict fmt,...) pg_attribute_printf(2, 3);
void pg_log_generic_v(enum pg_log_level level, const char *pg_restrict fmt, va_list ap) pg_attribute_printf(2, 0);
#define pg_log_fatal(...) do { \
if (likely(__pg_log_level <= PG_LOG_FATAL)) pg_log_generic(PG_LOG_FATAL, __VA_ARGS__); \
@@ -92,4 +92,4 @@ void pg_log_generic_v(enum pg_log_level level, const char * pg_restrict fmt, va_
if (unlikely(__pg_log_level <= PG_LOG_DEBUG)) pg_log_generic(PG_LOG_DEBUG, __VA_ARGS__); \
} while(0)
#endif /* COMMON_LOGGING_H */
#endif /* COMMON_LOGGING_H */

View File

@@ -27,7 +27,7 @@ typedef struct ParallelExecutorInfo
ParallelContext *pcxt; /* parallel context we're using */
BufferUsage *buffer_usage; /* points to bufusage area in DSM */
SharedExecutorInstrumentation *instrumentation; /* optional */
struct SharedJitInstrumentation *jit_instrumentation; /* optional */
struct SharedJitInstrumentation *jit_instrumentation; /* optional */
dsa_area *area; /* points to DSA area in DSM */
dsa_pointer param_exec; /* serialized PARAM_EXEC parameters */
bool finished; /* set true by ExecParallelFinish */

View File

@@ -127,15 +127,15 @@ extern TupleHashTable BuildTupleHashTable(PlanState *parent,
MemoryContext tablecxt,
MemoryContext tempcxt, bool use_variable_hash_iv);
extern TupleHashTable BuildTupleHashTableExt(PlanState *parent,
TupleDesc inputDesc,
int numCols, AttrNumber *keyColIdx,
const Oid *eqfuncoids,
FmgrInfo *hashfunctions,
Oid *collations,
long nbuckets, Size additionalsize,
MemoryContext metacxt,
MemoryContext tablecxt,
MemoryContext tempcxt, bool use_variable_hash_iv);
TupleDesc inputDesc,
int numCols, AttrNumber *keyColIdx,
const Oid *eqfuncoids,
FmgrInfo *hashfunctions,
Oid *collations,
long nbuckets, Size additionalsize,
MemoryContext metacxt,
MemoryContext tablecxt,
MemoryContext tempcxt, bool use_variable_hash_iv);
extern TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable,
TupleTableSlot *slot,
bool *isnew);
@@ -204,7 +204,7 @@ extern void EvalPlanQualInit(EPQState *epqstate, EState *estate,
extern void EvalPlanQualSetPlan(EPQState *epqstate,
Plan *subplan, List *auxrowmarks);
extern TupleTableSlot *EvalPlanQualSlot(EPQState *epqstate,
Relation relation, Index rti);
Relation relation, Index rti);
#define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot))
extern void EvalPlanQualFetchRowMarks(EPQState *epqstate);
@@ -435,12 +435,12 @@ extern void ExecScanReScan(ScanState *node);
*/
extern void ExecInitResultTypeTL(PlanState *planstate);
extern void ExecInitResultSlot(PlanState *planstate,
const TupleTableSlotOps *tts_ops);
const TupleTableSlotOps *tts_ops);
extern void ExecInitResultTupleSlotTL(PlanState *planstate,
const TupleTableSlotOps *tts_ops);
const TupleTableSlotOps *tts_ops);
extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
TupleDesc tupleDesc,
const TupleTableSlotOps *tts_ops);
TupleDesc tupleDesc,
const TupleTableSlotOps *tts_ops);
extern TupleTableSlot *ExecInitExtraTupleSlot(EState *estate,
TupleDesc tupledesc,
const TupleTableSlotOps *tts_ops);
@@ -516,7 +516,7 @@ extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
extern TupleDesc ExecGetResultType(PlanState *planstate);
extern TupleTableSlot ExecGetResultSlot(PlanState *planstate);
extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
bool *isfixed);
bool *isfixed);
extern void ExecAssignProjectionInfo(PlanState *planstate,
TupleDesc inputDesc);
extern void ExecConditionalAssignProjectionInfo(PlanState *planstate,

View File

@@ -127,21 +127,21 @@ typedef struct TupleTableSlot
#define FIELDNO_TUPLETABLESLOT_ISNULL 6
bool *tts_isnull; /* current per-attribute isnull flags */
MemoryContext tts_mcxt; /* slot itself is in this context */
ItemPointerData tts_tid; /* stored tuple's tid */
Oid tts_tableOid; /* table oid of tuple */
ItemPointerData tts_tid; /* stored tuple's tid */
Oid tts_tableOid; /* table oid of tuple */
} TupleTableSlot;
/* routines for a TupleTableSlot implementation */
struct TupleTableSlotOps
{
/* Minimum size of the slot */
size_t base_slot_size;
size_t base_slot_size;
/* Initialization. */
void (*init)(TupleTableSlot *slot);
void (*init) (TupleTableSlot *slot);
/* Destruction. */
void (*release)(TupleTableSlot *slot);
void (*release) (TupleTableSlot *slot);
/*
* Clear the contents of the slot. Only the contents are expected to be
@@ -149,7 +149,7 @@ struct TupleTableSlotOps
* this callback should free the memory allocated for the tuple contained
* in the slot.
*/
void (*clear)(TupleTableSlot *slot);
void (*clear) (TupleTableSlot *slot);
/*
* Fill up first natts entries of tts_values and tts_isnull arrays with
@@ -158,26 +158,26 @@ struct TupleTableSlotOps
* in which case it should set tts_nvalid to the number of returned
* columns.
*/
void (*getsomeattrs)(TupleTableSlot *slot, int natts);
void (*getsomeattrs) (TupleTableSlot *slot, int natts);
/*
* Returns value of the given system attribute as a datum and sets isnull
* to false, if it's not NULL. Throws an error if the slot type does not
* support system attributes.
*/
Datum (*getsysattr)(TupleTableSlot *slot, int attnum, bool *isnull);
Datum (*getsysattr) (TupleTableSlot *slot, int attnum, bool *isnull);
/*
* Make the contents of the slot solely depend on the slot, and not on
* underlying resources (like another memory context, buffers, etc).
*/
void (*materialize)(TupleTableSlot *slot);
void (*materialize) (TupleTableSlot *slot);
/*
* Copy the contents of the source slot into the destination slot's own
* context. Invoked using callback of the destination slot.
*/
void (*copyslot) (TupleTableSlot *dstslot, TupleTableSlot *srcslot);
void (*copyslot) (TupleTableSlot *dstslot, TupleTableSlot *srcslot);
/*
* Return a heap tuple "owned" by the slot. It is slot's responsibility to
@@ -185,7 +185,7 @@ struct TupleTableSlotOps
* heap tuple, it should not implement this callback and should set it as
* NULL.
*/
HeapTuple (*get_heap_tuple)(TupleTableSlot *slot);
HeapTuple (*get_heap_tuple) (TupleTableSlot *slot);
/*
* Return a minimal tuple "owned" by the slot. It is slot's responsibility
@@ -193,7 +193,7 @@ struct TupleTableSlotOps
* "own" a minimal tuple, it should not implement this callback and should
* set it as NULL.
*/
MinimalTuple (*get_minimal_tuple)(TupleTableSlot *slot);
MinimalTuple (*get_minimal_tuple) (TupleTableSlot *slot);
/*
* Return a copy of heap tuple representing the contents of the slot. The
@@ -203,17 +203,17 @@ struct TupleTableSlotOps
* the slot i.e. the caller has to take responsibilty to free memory
* consumed by the slot.
*/
HeapTuple (*copy_heap_tuple)(TupleTableSlot *slot);
HeapTuple (*copy_heap_tuple) (TupleTableSlot *slot);
/*
* Return a copy of minimal tuple representing the contents of the slot. The
* copy needs to be palloc'd in the current memory context. The slot
* Return a copy of minimal tuple representing the contents of the slot.
* The copy needs to be palloc'd in the current memory context. The slot
* itself is expected to remain unaffected. It is *not* expected to have
* meaningful "system columns" in the copy. The copy is not be "owned" by
* the slot i.e. the caller has to take responsibilty to free memory
* consumed by the slot.
*/
MinimalTuple (*copy_minimal_tuple)(TupleTableSlot *slot);
MinimalTuple (*copy_minimal_tuple) (TupleTableSlot *slot);
};
/*
@@ -239,7 +239,7 @@ typedef struct VirtualTupleTableSlot
{
TupleTableSlot base;
char *data; /* data for materialized slots */
char *data; /* data for materialized slots */
} VirtualTupleTableSlot;
typedef struct HeapTupleTableSlot
@@ -247,10 +247,10 @@ typedef struct HeapTupleTableSlot
TupleTableSlot base;
#define FIELDNO_HEAPTUPLETABLESLOT_TUPLE 1
HeapTuple tuple; /* physical tuple */
HeapTuple tuple; /* physical tuple */
#define FIELDNO_HEAPTUPLETABLESLOT_OFF 2
uint32 off; /* saved state for slot_deform_heap_tuple */
HeapTupleData tupdata; /* optional workspace for storing tuple */
uint32 off; /* saved state for slot_deform_heap_tuple */
HeapTupleData tupdata; /* optional workspace for storing tuple */
} HeapTupleTableSlot;
/* heap tuple residing in a buffer */
@@ -265,7 +265,7 @@ typedef struct BufferHeapTupleTableSlot
* false in such a case, since presumably tts_tuple is pointing at the
* buffer page.)
*/
Buffer buffer; /* tuple's buffer, or InvalidBuffer */
Buffer buffer; /* tuple's buffer, or InvalidBuffer */
} BufferHeapTupleTableSlot;
typedef struct MinimalTupleTableSlot
@@ -280,11 +280,11 @@ typedef struct MinimalTupleTableSlot
* physical tuples.
*/
#define FIELDNO_MINIMALTUPLETABLESLOT_TUPLE 1
HeapTuple tuple; /* tuple wrapper */
MinimalTuple mintuple; /* minimal tuple, or NULL if none */
HeapTupleData minhdr; /* workspace for minimal-tuple-only case */
HeapTuple tuple; /* tuple wrapper */
MinimalTuple mintuple; /* minimal tuple, or NULL if none */
HeapTupleData minhdr; /* workspace for minimal-tuple-only case */
#define FIELDNO_MINIMALTUPLETABLESLOT_OFF 4
uint32 off; /* saved state for slot_deform_heap_tuple */
uint32 off; /* saved state for slot_deform_heap_tuple */
} MinimalTupleTableSlot;
/*
@@ -313,13 +313,13 @@ extern TupleTableSlot *ExecStoreBufferHeapTuple(HeapTuple tuple,
TupleTableSlot *slot,
Buffer buffer);
extern TupleTableSlot *ExecStorePinnedBufferHeapTuple(HeapTuple tuple,
TupleTableSlot *slot,
Buffer buffer);
TupleTableSlot *slot,
Buffer buffer);
extern TupleTableSlot *ExecStoreMinimalTuple(MinimalTuple mtup,
TupleTableSlot *slot,
bool shouldFree);
extern void ExecForceStoreMinimalTuple(MinimalTuple mtup, TupleTableSlot *slot,
bool shouldFree);
bool shouldFree);
extern TupleTableSlot *ExecStoreVirtualTuple(TupleTableSlot *slot);
extern TupleTableSlot *ExecStoreAllNullTuple(TupleTableSlot *slot);
extern void ExecStoreHeapTupleDatum(Datum data, TupleTableSlot *slot);

View File

@@ -286,7 +286,7 @@ extern void be_tls_get_peer_serial(Port *port, char *ptr, size_t len);
extern char *be_tls_get_certificate_hash(Port *port, size_t *len);
#endif
#endif /* USE_SSL */
#endif /* USE_SSL */
#ifdef ENABLE_GSS
/*

View File

@@ -25,7 +25,7 @@
#include <signal.h>
#include "datatype/timestamp.h" /* for TimestampTZ */
#include "datatype/timestamp.h" /* for TimestampTZ */
#include "pgtime.h" /* for pg_time_t */

View File

@@ -431,7 +431,7 @@ typedef struct ResultRelInfo
Instrumentation *ri_TrigInstrument;
/* On-demand created slots for triggers / returning processing */
TupleTableSlot *ri_ReturningSlot; /* for trigger output tuples */
TupleTableSlot *ri_ReturningSlot; /* for trigger output tuples */
TupleTableSlot *ri_TrigOldSlot; /* for a trigger's old tuple */
TupleTableSlot *ri_TrigNewSlot; /* for a trigger's new tuple */
@@ -700,7 +700,7 @@ typedef struct TupleHashTableData
AttrNumber *keyColIdx; /* attr numbers of key columns */
FmgrInfo *tab_hash_funcs; /* hash functions for table datatype(s) */
ExprState *tab_eq_func; /* comparator for table datatype(s) */
Oid *tab_collations; /* collations for hash and comparison */
Oid *tab_collations; /* collations for hash and comparison */
MemoryContext tablecxt; /* memory context containing table */
MemoryContext tempcxt; /* context for function evaluations */
Size entrysize; /* actual size to make each hash entry */
@@ -870,7 +870,7 @@ typedef struct SubPlanState
AttrNumber *keyColIdx; /* control data for hash tables */
Oid *tab_eq_funcoids; /* equality func oids for table
* datatype(s) */
Oid *tab_collations; /* collations for hash and comparison */
Oid *tab_collations; /* collations for hash and comparison */
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) */
@@ -979,7 +979,7 @@ typedef struct PlanState
/*
* Other run-time state needed by most if not all node types.
*/
TupleDesc ps_ResultTupleDesc; /* node's return type */
TupleDesc ps_ResultTupleDesc; /* node's return type */
TupleTableSlot *ps_ResultTupleSlot; /* slot for my result tuples */
ExprContext *ps_ExprContext; /* node's expression-evaluation context */
ProjectionInfo *ps_ProjInfo; /* info for doing tuple projection */
@@ -1018,14 +1018,14 @@ typedef struct PlanState
const TupleTableSlotOps *outerops;
const TupleTableSlotOps *innerops;
const TupleTableSlotOps *resultops;
bool scanopsfixed;
bool outeropsfixed;
bool inneropsfixed;
bool resultopsfixed;
bool scanopsset;
bool outeropsset;
bool inneropsset;
bool resultopsset;
bool scanopsfixed;
bool outeropsfixed;
bool inneropsfixed;
bool resultopsfixed;
bool scanopsset;
bool outeropsset;
bool inneropsset;
bool resultopsset;
} PlanState;
/* ----------------
@@ -1113,8 +1113,8 @@ typedef struct ModifyTableState
PlanState **mt_plans; /* subplans (one per target rel) */
int mt_nplans; /* number of plans in the array */
int mt_whichplan; /* which one is being executed (0..n-1) */
TupleTableSlot** mt_scans; /* input tuple corresponding to underlying
plans */
TupleTableSlot **mt_scans; /* input tuple corresponding to underlying
* plans */
ResultRelInfo *resultRelInfo; /* per-subplan target relations */
ResultRelInfo *rootResultRelInfo; /* root target relation (partitioned
* table root) */
@@ -1321,14 +1321,14 @@ typedef struct SampleScanState
*/
typedef struct
{
struct ScanKeyData *scan_key; /* scankey to put value into */
struct ScanKeyData *scan_key; /* scankey to put value into */
ExprState *key_expr; /* expr to evaluate to get value */
bool key_toastable; /* is expr's result a toastable datatype? */
} IndexRuntimeKeyInfo;
typedef struct
{
struct ScanKeyData *scan_key; /* scankey to put value into */
struct ScanKeyData *scan_key; /* scankey to put value into */
ExprState *array_expr; /* expr to evaluate to get array value */
int next_elem; /* next array element to use */
int num_elems; /* number of elems in current array value */

View File

@@ -2138,7 +2138,7 @@ typedef struct Constraint
bool is_no_inherit; /* is constraint non-inheritable? */
Node *raw_expr; /* expr, as untransformed parse tree */
char *cooked_expr; /* expr, as nodeToString representation */
char generated_when; /* ALWAYS or BY DEFAULT */
char generated_when; /* ALWAYS or BY DEFAULT */
char generated_kind; /* currently always STORED */
/* Fields used for unique constraints (UNIQUE and PRIMARY KEY): */
@@ -3174,7 +3174,7 @@ typedef struct ClusterStmt
typedef struct VacuumStmt
{
NodeTag type;
List *options; /* list of DefElem nodes */
List *options; /* list of DefElem nodes */
List *rels; /* list of VacuumRelation, or NIL for all */
bool is_vacuumcmd; /* true for VACUUM, false for ANALYZE */
} VacuumStmt;

View File

@@ -818,7 +818,7 @@ typedef struct WindowAgg
int partNumCols; /* number of columns in partition clause */
AttrNumber *partColIdx; /* their indexes in the target list */
Oid *partOperators; /* equality operators for partition columns */
Oid *partCollations; /* collations for partition columns */
Oid *partCollations; /* collations for partition columns */
int ordNumCols; /* number of columns in ordering clause */
AttrNumber *ordColIdx; /* their indexes in the target list */
Oid *ordOperators; /* equality operators for ordering columns */
@@ -844,7 +844,7 @@ typedef struct Unique
int numCols; /* number of columns to check for uniqueness */
AttrNumber *uniqColIdx; /* their indexes in the target list */
Oid *uniqOperators; /* equality operators to compare with */
Oid *uniqCollations; /* collations for equality comparisons */
Oid *uniqCollations; /* collations for equality comparisons */
} Unique;
/* ------------

View File

@@ -70,9 +70,9 @@ typedef enum ParseExprKind
EXPR_KIND_POLICY, /* USING or WITH CHECK expr in policy */
EXPR_KIND_PARTITION_BOUND, /* partition bound expression */
EXPR_KIND_PARTITION_EXPRESSION, /* PARTITION BY expression */
EXPR_KIND_CALL_ARGUMENT, /* procedure argument in CALL */
EXPR_KIND_CALL_ARGUMENT, /* procedure argument in CALL */
EXPR_KIND_COPY_WHERE, /* WHERE condition in COPY FROM */
EXPR_KIND_GENERATED_COLUMN, /* generation expression for a column */
EXPR_KIND_GENERATED_COLUMN, /* generation expression for a column */
} ParseExprKind;

View File

@@ -541,7 +541,7 @@ typedef struct PgStat_MsgChecksumFailure
PgStat_MsgHdr m_hdr;
Oid m_databaseid;
int m_failurecount;
TimestampTz m_failure_time;
TimestampTz m_failure_time;
} PgStat_MsgChecksumFailure;

View File

@@ -508,6 +508,7 @@ extern char *inet_net_ntop(int af, const void *src, int bits,
/* port/pg_strong_random.c */
extern bool pg_strong_random(void *buf, size_t len);
/*
* pg_backend_random used to be a wrapper for pg_strong_random before
* Postgres 12 for the backend code.

View File

@@ -47,8 +47,8 @@ typedef struct LogicalDecodingContext
/*
* Marks the logical decoding context as fast forward decoding one. Such a
* context does not have plugin loaded so most of the following
* properties are unused.
* context does not have plugin loaded so most of the following properties
* are unused.
*/
bool fast_forward;

View File

@@ -402,8 +402,8 @@ void ReorderBufferReturnTupleBuf(ReorderBuffer *, ReorderBufferTupleBuf *tuple)
ReorderBufferChange *ReorderBufferGetChange(ReorderBuffer *);
void ReorderBufferReturnChange(ReorderBuffer *, ReorderBufferChange *);
Oid * ReorderBufferGetRelids(ReorderBuffer *, int nrelids);
void ReorderBufferReturnRelids(ReorderBuffer *, Oid *relids);
Oid *ReorderBufferGetRelids(ReorderBuffer *, int nrelids);
void ReorderBufferReturnRelids(ReorderBuffer *, Oid *relids);
void ReorderBufferQueueChange(ReorderBuffer *, TransactionId, XLogRecPtr lsn, ReorderBufferChange *);
void ReorderBufferQueueMessage(ReorderBuffer *, TransactionId, Snapshot snapshot, XLogRecPtr lsn,

View File

@@ -71,8 +71,8 @@ extern MVDependencies *statext_dependencies_deserialize(bytea *data);
extern MCVList *statext_mcv_build(int numrows, HeapTuple *rows,
Bitmapset *attrs, VacAttrStats **stats,
double totalrows);
extern bytea *statext_mcv_serialize(MCVList * mcv, VacAttrStats **stats);
extern MCVList * statext_mcv_deserialize(bytea *data);
extern bytea *statext_mcv_serialize(MCVList *mcv, VacAttrStats **stats);
extern MCVList *statext_mcv_deserialize(bytea *data);
extern MultiSortSupport multi_sort_init(int ndims);
extern void multi_sort_add_dimension(MultiSortSupport mss, int sortdim,

View File

@@ -77,7 +77,7 @@ typedef struct MVDependencies
typedef struct MCVItem
{
double frequency; /* frequency of this combination */
double base_frequency; /* frequency if independent */
double base_frequency; /* frequency if independent */
bool *isnull; /* NULL flags */
Datum *values; /* item values */
} MCVItem;

View File

@@ -147,7 +147,7 @@ extern int durable_rename(const char *oldfile, const char *newfile, int loglevel
extern int durable_unlink(const char *fname, int loglevel);
extern int durable_link_or_rename(const char *oldfile, const char *newfile, int loglevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
extern int data_sync_elevel(int elevel);
/* Filename components */
#define PG_TEMP_FILES_DIR "pgsql_tmp"

View File

@@ -44,8 +44,8 @@ extern void ForgetDatabaseSyncRequests(Oid dbid);
extern void DropRelationFiles(RelFileNode *delrels, int ndelrels, bool isRedo);
/* md sync callbacks */
extern int mdsyncfiletag(const FileTag *ftag, char *path);
extern int mdunlinkfiletag(const FileTag *ftag, char *path);
extern int mdsyncfiletag(const FileTag *ftag, char *path);
extern int mdunlinkfiletag(const FileTag *ftag, char *path);
extern bool mdfiletagmatches(const FileTag *ftag, const FileTag *candidate);
#endif /* MD_H */

View File

@@ -102,7 +102,7 @@ typedef struct CollectedCommand
} defprivs;
} d;
struct CollectedCommand *parent; /* when nested */
struct CollectedCommand *parent; /* when nested */
} CollectedCommand;
#endif /* DEPARSE_UTILITY_H */

View File

@@ -53,7 +53,7 @@ extern bool datumIsEqual(Datum value1, Datum value2,
* true if the two datums are equal, false otherwise.
*/
extern bool datum_image_eq(Datum value1, Datum value2,
bool typByVal, int typLen);
bool typByVal, int typLen);
/*
* Serialize and restore datums so that we can transfer them to parallel