| From: | zengman <zengman(at)halodbtech(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Remove redundant cast in gindesc.c |
| Date: | 2026-03-10 01:31:33 |
| Message-ID: | tencent_2A6E523928B834AE74ED06F8@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
While reviewing the code, I noticed a small detail and made this simple patch.
There are no functional changes; it’s just meant to make the code look a bit cleaner.
```
diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c
index 66a0bf0e0e7..4e24a1cdfe7 100644
--- a/src/backend/access/rmgrdesc/gindesc.c
+++ b/src/backend/access/rmgrdesc/gindesc.c
@@ -126,7 +126,7 @@ gin_desc(StringInfo buf, XLogReaderState *record)
ginxlogSplit *xlrec = (ginxlogSplit *) rec;
appendStringInfo(buf, "isrootsplit: %c",
- (((ginxlogSplit *) rec)->flags & GIN_SPLIT_ROOT) ? 'T' : 'F');
+ (xlrec->flags & GIN_SPLIT_ROOT) ? 'T' : 'F');
appendStringInfo(buf, " isdata: %c isleaf: %c",
(xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F',
(xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F');
```
--
regards,
Man Zeng
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Remove-redundant-cast-in-gindesc.c.patch | application/octet-stream | 1.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-03-10 01:42:17 | Re: client_connection_check_interval default value |
| Previous Message | Fujii Masao | 2026-03-10 01:17:08 | Re: Add missing stats_reset column to pg_stat_database_conflicts view |