Skip to content

Commit

Permalink
Fix the problem that gsql cannot connect in version 3.1.0 #28482 (#28483
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jiangML authored Sep 21, 2023
1 parent 3b19fe7 commit 1aa5887
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public static void registryUserDefinedFunction(final String schemaName, final Sc
schemaPlus.add("gs_password_deadline", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "gsPasswordDeadline"));
schemaPlus.add("intervaltonum", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "intervalToNum"));
schemaPlus.add("gs_password_notifyTime", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "gsPasswordNotifyTime"));
schemaPlus.add("pg_catalog.gs_password_deadline", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "gsPasswordDeadline"));
schemaPlus.add("pg_catalog.intervaltonum", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "intervalToNum"));
schemaPlus.add("pg_catalog.gs_password_notifyTime", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "gsPasswordNotifyTime"));
if ("pg_catalog".equalsIgnoreCase(schemaName)) {
schemaPlus.add("pg_catalog.pg_table_is_visible", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "pgTableIsVisible"));
schemaPlus.add("pg_catalog.pg_get_userbyid", ScalarFunctionImpl.create(SQLFederationFunctionUtils.class, "pgGetUserById"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ public final class OpenGaussAdminExecutorCreator implements DatabaseAdminExecuto
static {
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("VERSION()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("opengauss_version()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("gs_password_deadline()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("intervaltonum()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("intervaltonum(gs_password_deadline())");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("gs_password_notifytime()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("pg_catalog.gs_password_deadline()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("pg_catalog.intervaltonum()");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("pg_catalog.intervaltonum(pg_catalog.gs_password_deadline())");
SYSTEM_CATALOG_QUERY_EXPRESSIONS.add("pg_catalog.gs_password_notifytime()");
SYSTEM_CATALOG_TABLES.add("pg_class");
SYSTEM_CATALOG_TABLES.add("pg_namespace");
SYSTEM_CATALOG_TABLES.add("pg_database");
Expand Down

0 comments on commit 1aa5887

Please sign in to comment.