v28-review-0003-pgindent.patch
text/x-patch
Filename: v28-review-0003-pgindent.patch
Type: text/x-patch
Part: 2
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v28-0003
Subject: pgindent
| File | + | − |
|---|---|---|
| contrib/amcheck/amcheck.c | 2 | 1 |
| contrib/amcheck/verify_nbtree.c | 11 | 11 |
From f82459e7c4b082b91707ed9fb4252fc8d72fa058 Mon Sep 17 00:00:00 2001
From: Tomas Vondra <tv@fuzzy.cz>
Date: Wed, 10 Jul 2024 15:45:49 +0200
Subject: [PATCH v28-review 03/13] pgindent
---
contrib/amcheck/amcheck.c | 3 ++-
contrib/amcheck/verify_nbtree.c | 22 +++++++++++-----------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/contrib/amcheck/amcheck.c b/contrib/amcheck/amcheck.c
index 41cdb5e35a4..964c06e7376 100644
--- a/contrib/amcheck/amcheck.c
+++ b/contrib/amcheck/amcheck.c
@@ -158,9 +158,10 @@ index_checkable(Relation rel, Oid am_id)
{
if (rel->rd_rel->relkind != RELKIND_INDEX ||
rel->rd_rel->relam != am_id)
+ /* FIXME name AM, shouldn't be hhard to lookup in AMOID syscache */
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("only B-Tree indexes are supported as targets for verification"), //FIXME name AM, shouldn't be hhard to lookup in AMOID syscache
+ errmsg("only B-Tree indexes are supported as targets for verification"),
errdetail("Relation \"%s\" is not a B-Tree index.",
RelationGetRelationName(rel))));
diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c
index 2e30c0c693e..b630e36ead7 100644
--- a/contrib/amcheck/verify_nbtree.c
+++ b/contrib/amcheck/verify_nbtree.c
@@ -162,11 +162,11 @@ typedef struct BtreeLastVisibleEntry
*/
typedef struct BTCallbackState
{
- bool parentcheck;
- bool heapallindexed;
- bool rootdescend;
- bool checkunique;
-} BTCallbackState;
+ bool parentcheck;
+ bool heapallindexed;
+ bool rootdescend;
+ bool checkunique;
+} BTCallbackState;
PG_FUNCTION_INFO_V1(bt_index_check);
PG_FUNCTION_INFO_V1(bt_index_parent_check);
@@ -330,13 +330,13 @@ bt_index_check_callback(Relation indrel, Relation heaprel, void *state, bool rea
for (int i = 0; i < IndexRelationGetNumberOfKeyAttributes(indrel); i++)
if (indrel->rd_opfamily[i] == INTERVAL_BTREE_FAM_OID)
has_interval_ops = true;
- ereport(ERROR,
- (errcode(ERRCODE_INDEX_CORRUPTED),
- errmsg("index \"%s\" metapage incorrectly indicates that deduplication is safe",
+ ereport(ERROR,
+ (errcode(ERRCODE_INDEX_CORRUPTED),
+ errmsg("index \"%s\" metapage incorrectly indicates that deduplication is safe",
RelationGetRelationName(indrel)),
- has_interval_ops
- ? errhint("This is known of \"interval\" indexes last built on a version predating 2023-11.")
- : 0));
+ has_interval_ops
+ ? errhint("This is known of \"interval\" indexes last built on a version predating 2023-11.")
+ : 0));
}
/* Check index, possibly against table it is an index on */
--
2.45.2