mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@@ -77,13 +77,13 @@ typedef bool (*aminsert_function) (Relation indexRelation,
|
||||
|
||||
/* bulk delete */
|
||||
typedef IndexBulkDeleteResult *(*ambulkdelete_function) (IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
|
||||
/* post-VACUUM cleanup */
|
||||
typedef IndexBulkDeleteResult *(*amvacuumcleanup_function) (IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
|
||||
/* can indexscan return IndexTuples? */
|
||||
typedef bool (*amcanreturn_function) (Relation indexRelation, int attno);
|
||||
@@ -104,7 +104,7 @@ typedef bytea *(*amoptions_function) (Datum reloptions,
|
||||
|
||||
/* report AM, index, or index column property */
|
||||
typedef bool (*amproperty_function) (Oid index_oid, int attno,
|
||||
IndexAMProperty prop, const char *propname,
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
|
||||
/* validate definition of an opclass for this AM */
|
||||
|
@@ -36,7 +36,7 @@ typedef struct xl_clog_truncate
|
||||
} xl_clog_truncate;
|
||||
|
||||
extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
|
||||
TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
|
||||
TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
|
||||
extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);
|
||||
|
||||
extern Size CLOGShmemBuffers(void);
|
||||
|
@@ -152,7 +152,7 @@ extern void index_markpos(IndexScanDesc scan);
|
||||
extern void index_restrpos(IndexScanDesc scan);
|
||||
extern Size index_parallelscan_estimate(Relation indexrel, Snapshot snapshot);
|
||||
extern void index_parallelscan_initialize(Relation heaprel, Relation indexrel,
|
||||
Snapshot snapshot, ParallelIndexScanDesc target);
|
||||
Snapshot snapshot, ParallelIndexScanDesc target);
|
||||
extern void index_parallelrescan(IndexScanDesc scan);
|
||||
extern IndexScanDesc index_beginscan_parallel(Relation heaprel,
|
||||
Relation indexrel, int nkeys, int norderbys,
|
||||
|
@@ -95,7 +95,7 @@ extern int ginCompareEntries(GinState *ginstate, OffsetNumber attnum,
|
||||
Datum b, GinNullCategory categoryb);
|
||||
extern int ginCompareAttEntries(GinState *ginstate,
|
||||
OffsetNumber attnuma, Datum a, GinNullCategory categorya,
|
||||
OffsetNumber attnumb, Datum b, GinNullCategory categoryb);
|
||||
OffsetNumber attnumb, Datum b, GinNullCategory categoryb);
|
||||
extern Datum *ginExtractEntries(GinState *ginstate, OffsetNumber attnum,
|
||||
Datum value, bool isNull,
|
||||
int32 *nentries, GinNullCategory **categories);
|
||||
|
@@ -338,7 +338,7 @@ extern void _hash_pgaddmultitup(Relation rel, Buffer buf, IndexTuple *itups,
|
||||
extern Buffer _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf, bool retain_pin);
|
||||
extern BlockNumber _hash_freeovflpage(Relation rel, Buffer bucketbuf, Buffer ovflbuf,
|
||||
Buffer wbuf, IndexTuple *itups, OffsetNumber *itup_offsets,
|
||||
Size *tups_size, uint16 nitups, BufferAccessStrategy bstrategy);
|
||||
Size *tups_size, uint16 nitups, BufferAccessStrategy bstrategy);
|
||||
extern void _hash_initbitmapbuffer(Buffer buf, uint16 bmsize, bool initpage);
|
||||
extern void _hash_squeezebucket(Relation rel,
|
||||
Bucket bucket, BlockNumber bucket_blkno,
|
||||
|
@@ -117,13 +117,13 @@ extern HeapScanDesc heap_beginscan_bm(Relation relation, Snapshot snapshot,
|
||||
int nkeys, ScanKey key);
|
||||
extern HeapScanDesc heap_beginscan_sampling(Relation relation,
|
||||
Snapshot snapshot, int nkeys, ScanKey key,
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
extern void heap_setscanlimits(HeapScanDesc scan, BlockNumber startBlk,
|
||||
BlockNumber endBlk);
|
||||
extern void heapgetpage(HeapScanDesc scan, BlockNumber page);
|
||||
extern void heap_rescan(HeapScanDesc scan, ScanKey key);
|
||||
extern void heap_rescan_set_params(HeapScanDesc scan, ScanKey key,
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
extern void heap_endscan(HeapScanDesc scan);
|
||||
extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction);
|
||||
|
||||
|
@@ -308,8 +308,8 @@ typedef enum SessionBackupState
|
||||
} SessionBackupState;
|
||||
|
||||
extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
|
||||
TimeLineID *starttli_p, StringInfo labelfile, DIR *tblspcdir,
|
||||
List **tablespaces, StringInfo tblspcmapfile, bool infotbssize,
|
||||
TimeLineID *starttli_p, StringInfo labelfile, DIR *tblspcdir,
|
||||
List **tablespaces, StringInfo tblspcmapfile, bool infotbssize,
|
||||
bool needtblspcmapfile);
|
||||
extern XLogRecPtr do_pg_stop_backup(char *labelfile, bool waitforarchive,
|
||||
TimeLineID *stoptli_p);
|
||||
|
Reference in New Issue
Block a user