Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update error content for PostgreSQL index-key-number rule (#4302)
rebelice33ad0cd5348b
diff --git a/plugin/advisor/pg/advisor_index_key_number_limit.go b/plugin/advisor/pg/advisor_index_key_number_limit.goindex 84dd8bc05f..1d880d4de2 100644--- a/plugin/advisor/pg/advisor_index_key_number_limit.go+++ b/plugin/advisor/pg/advisor_index_key_number_limit.go@@ -108,7 +108,7 @@ func (checker *indexKeyNumberLimitChecker) Visit(node ast.Node) ast.Visitor {Status: checker.level,Code: advisor.IndexKeyNumberExceedsLimit,Title: checker.title,- Content: fmt.Sprintf("The number of index `%s` in table `%s` should be not greater than %d", index.indexName, index.tableName, checker.max),+ Content: fmt.Sprintf("The number of keys of index %q in table %q should be not greater than %d", index.indexName, index.tableName, checker.max),Line: index.line,})}diff --git a/plugin/advisor/pg/test/index_key_number_limit.yaml b/plugin/advisor/pg/test/index_key_number_limit.yamlindex b150c4f700..44fb7feb61 100644--- a/plugin/advisor/pg/test/index_key_number_limit.yaml+++ b/plugin/advisor/pg/test/index_key_number_limit.yaml@@ -24,14 +24,14 @@- status: WARNcode: 802title: index.key-number-limit- content: The number of index `t_id_name` in table `t` should be not greater than 5+ content: The number of keys of index "t_id_name" in table "t" should be not greater than 5line: 1- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name UNIQUE (id, name, c1, c2, c3, c4));want:- status: WARNcode: 802title: index.key-number-limit- content: The number of index `t_id_name` in table `t` should be not greater than 5+ content: The number of keys of index "t_id_name" in table "t" should be not greater than 5line: 1- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);@@ -40,7 +40,7 @@- status: WARNcode: 802title: index.key-number-limit- content: The number of index `idx_address_phone` in table `address` should be not greater than 5+ content: The number of keys of index "idx_address_phone" in table "address" should be not greater than 5line: 2- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);@@ -49,7 +49,7 @@- status: WARNcode: 802title: index.key-number-limit- content: The number of index `idx_address_phone` in table `address` should be not greater than 5+ content: The number of keys of index "idx_address_phone" in table "address" should be not greater than 5line: 2- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);@@ -58,5 +58,5 @@- status: WARNcode: 802title: index.key-number-limit- content: The number of index `address_id_name` in table `address` should be not greater than 5+ content: The number of keys of index "address_id_name" in table "address" should be not greater than 5line: 2