v11-0001-minor-indentation-changes.no-cfbot

application/octet-stream

Filename: v11-0001-minor-indentation-changes.no-cfbot
Type: application/octet-stream
Part: 0
Message: Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)
From 9d8a2e41c39d5d8e91c9eb8262f8bf5250930f0f Mon Sep 17 00:00:00 2001
From: jian he <jian.universality@gmail.com>
Date: Wed, 5 Feb 2025 19:56:09 +0800
Subject: [PATCH v11 1/1] minor indentation changes

---
 src/backend/parser/gram.y                     | 4 ++--
 src/backend/utils/adt/ruleutils.c             | 2 +-
 src/test/modules/test_ddl_deparse/meson.build | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 1f9a79dfd58..88b98c0022b 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -8268,7 +8268,7 @@ opt_unique:
 opt_index_visibility:
 			VISIBLE                       { $$ = true; }
 			| INVISIBLE                   { $$ = false; }
-			| /*EMPTY*/                 	{ $$ = true; }
+			| /*EMPTY*/                   { $$ = true; }
 		;
 
 access_method_clause:
@@ -18033,7 +18033,7 @@ unreserved_keyword:
 			| VERSION_P
 			| VIEW
 			| VIEWS
-			|	VISIBLE
+			| VISIBLE
 			| VOLATILE
 			| WHITESPACE_P
 			| WITHIN
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index a46780de877..2e930d51251 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1565,7 +1565,7 @@ pg_get_indexdef_worker(Oid indexrelid, int colno,
 
 		/* Add INVISIBLE clause if the index is invisible */
 		if (!idxrec->indisvisible)
-				appendStringInfoString(&buf, " INVISIBLE");
+			appendStringInfoString(&buf, " INVISIBLE");
 	}
 
 	/* Clean up */
diff --git a/src/test/modules/test_ddl_deparse/meson.build b/src/test/modules/test_ddl_deparse/meson.build
index bff65ba6333..6654b5e46df 100644
--- a/src/test/modules/test_ddl_deparse/meson.build
+++ b/src/test/modules/test_ddl_deparse/meson.build
@@ -48,6 +48,7 @@ tests += {
       'opfamily',
       'defprivs',
       'matviews',
+      'alter_index',
     ],
   },
 }
-- 
2.34.1