From dc5dc4f8353647d1bedd3d58238cd0c15e5067d0 Mon Sep 17 00:00:00 2001 From: August Date: Mon, 26 Feb 2024 20:16:07 +0800 Subject: [PATCH] chore: add name column back in pg_user for backward compatibility (#15266) --- e2e_test/batch/catalog/pg_user.slt.part | 2 +- src/frontend/src/catalog/system_catalog/pg_catalog/pg_user.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e_test/batch/catalog/pg_user.slt.part b/e2e_test/batch/catalog/pg_user.slt.part index a57dde1a4eb71..d189703c03138 100644 --- a/e2e_test/batch/catalog/pg_user.slt.part +++ b/e2e_test/batch/catalog/pg_user.slt.part @@ -1,5 +1,5 @@ query ITTT -SELECT * FROM pg_catalog.pg_user order by usesysid; +SELECT usesysid, usename, usecreatedb, usesuper, passwd FROM pg_catalog.pg_user order by usesysid; ---- 1 root t t ******** 2 postgres t t ******** diff --git a/src/frontend/src/catalog/system_catalog/pg_catalog/pg_user.rs b/src/frontend/src/catalog/system_catalog/pg_catalog/pg_user.rs index c47d849458527..83687c68a92da 100644 --- a/src/frontend/src/catalog/system_catalog/pg_catalog/pg_user.rs +++ b/src/frontend/src/catalog/system_catalog/pg_catalog/pg_user.rs @@ -22,6 +22,7 @@ use risingwave_frontend_macro::system_catalog; "pg_catalog.pg_user", "SELECT id AS usesysid, name, + name AS usename, create_db AS usecreatedb, is_super AS usesuper, '********' AS passwd @@ -30,6 +31,7 @@ use risingwave_frontend_macro::system_catalog; #[derive(Fields)] struct PgUser { usesysid: i32, + name: String, // FIXME: For backward compatibility, remove it when the cloud update it. usename: String, usecreatedb: bool, usesuper: bool,