FlyingZC opened a new issue, #24662: URL: https://github.com/apache/shardingsphere/issues/24662
## Feature Request ### Background As a upper -level database standard, ShardingSphere needs to be compatible with the inquiries of the system database of various types of databases, such as MySQL, PostgreSQL, and OpenGAUSS. We are ready to be divided into two stages to implement this function: Phase 1: Mock all system database tables and view query, return to the empty result; Phase 2: Adapt to the query of each table and view in turn, and return the correct result. At this stage we only need to complete Phase one, the tasks are split as follows. ### Tasks ## mysql The system schemas included in mysql are: `information_schema`, `mysql`, `performance_schema`, `sys`. `information_schema` schema has 61 tables; `mysql` schema has 31 tables; `performance_schema` has 87 tables; `sys` has 1 table and 100 views. They are as follows: ### information_schema - [ ] CHARACTER_SETS - [ ] COLLATION_CHARACTER_SET_APPLICABILITY - [ ] COLLATIONS - [ ] COLUMN_PRIVILEGES - [ ] COLUMNS - [ ] ENGINES - [ ] EVENTS - [ ] FILES - [ ] GLOBAL_STATUS - [ ] GLOBAL_VARIABLES - [ ] INNODB_BUFFER_PAGE - [ ] INNODB_BUFFER_PAGE_LRU - [ ] INNODB_BUFFER_POOL_STATS - [ ] INNODB_CMP - [ ] INNODB_CMP_PER_INDEX - [ ] INNODB_CMP_PER_INDEX_RESET - [ ] INNODB_CMP_RESET - [ ] INNODB_CMPMEM - [ ] INNODB_CMPMEM_RESET - [ ] INNODB_FT_BEING_DELETED - [ ] INNODB_FT_CONFIG - [ ] INNODB_FT_DEFAULT_STOPWORD - [ ] INNODB_FT_DELETED - [ ] INNODB_FT_INDEX_CACHE - [ ] INNODB_FT_INDEX_TABLE - [ ] INNODB_LOCK_WAITS - [ ] INNODB_LOCKS - [ ] INNODB_METRICS - [ ] INNODB_SYS_COLUMNS - [ ] INNODB_SYS_DATAFILES - [ ] INNODB_SYS_FIELDS - [ ] INNODB_SYS_FOREIGN - [ ] INNODB_SYS_FOREIGN_COLS - [ ] INNODB_SYS_INDEXES - [ ] INNODB_SYS_TABLES - [ ] INNODB_SYS_TABLESPACES - [ ] INNODB_SYS_TABLESTATS - [ ] INNODB_SYS_VIRTUAL - [ ] INNODB_TEMP_TABLE_INFO - [ ] INNODB_TRX - [ ] KEY_COLUMN_USAGE - [ ] OPTIMIZER_TRACE - [ ] PARAMETERS - [ ] PARTITIONS - [ ] PLUGINS - [ ] PROCESSLIST - [ ] PROFILING - [ ] REFERENTIAL_CONSTRAINTS - [ ] ROUTINES - [ ] SCHEMA_PRIVILEGES - [ ] SCHEMATA - [ ] SESSION_STATUS - [ ] SESSION_VARIABLES - [ ] STATISTICS - [ ] TABLE_CONSTRAINTS - [ ] TABLE_PRIVILEGES - [ ] TABLES - [ ] TABLESPACES - [ ] TRIGGERS - [ ] USER_PRIVILEGES - [ ] VIEWS ### mysql - [ ] columns_priv - [ ] db - [ ] engine_cost - [ ] event - [ ] func - [ ] general_log - [ ] gtid_executed - [ ] help_category - [ ] help_keyword - [ ] help_relation - [ ] help_topic - [ ] innodb_index_stats - [ ] innodb_table_stats - [ ] ndb_binlog_index - [ ] plugin - [ ] proc - [ ] procs_priv - [ ] proxies_priv - [ ] server_cost - [ ] servers - [ ] slave_master_info - [ ] slave_relay_log_info - [ ] slave_worker_info - [ ] slow_log - [ ] tables_priv - [ ] time_zone - [ ] time_zone_leap_second - [ ] time_zone_name - [ ] time_zone_transition - [ ] time_zone_transition_type - [ ] user ### performance_schema - [ ] accounts - [ ] cond_instances - [ ] events_stages_current - [ ] events_stages_history - [ ] events_stages_history_long - [ ] events_stages_summary_by_account_by_event_name - [ ] events_stages_summary_by_host_by_event_name - [ ] events_stages_summary_by_thread_by_event_name - [ ] events_stages_summary_by_user_by_event_name - [ ] events_stages_summary_global_by_event_name - [ ] events_statements_current - [ ] events_statements_history - [ ] events_statements_history_long - [ ] events_statements_summary_by_account_by_event_name - [ ] events_statements_summary_by_digest - [ ] events_statements_summary_by_host_by_event_name - [ ] events_statements_summary_by_program - [ ] events_statements_summary_by_thread_by_event_name - [ ] events_statements_summary_by_user_by_event_name - [ ] events_statements_summary_global_by_event_name - [ ] events_transactions_current - [ ] events_transactions_history - [ ] events_transactions_history_long - [ ] events_transactions_summary_by_account_by_event_name - [ ] events_transactions_summary_by_host_by_event_name - [ ] events_transactions_summary_by_thread_by_event_name - [ ] events_transactions_summary_by_user_by_event_name - [ ] events_transactions_summary_global_by_event_name - [ ] events_waits_current - [ ] events_waits_history - [ ] events_waits_history_long - [ ] events_waits_summary_by_account_by_event_name - [ ] events_waits_summary_by_host_by_event_name - [ ] events_waits_summary_by_instance - [ ] events_waits_summary_by_thread_by_event_name - [ ] events_waits_summary_by_user_by_event_name - [ ] events_waits_summary_global_by_event_name - [ ] file_instances - [ ] file_summary_by_event_name - [ ] file_summary_by_instance - [ ] global_status - [ ] global_variables - [ ] host_cache - [ ] hosts - [ ] memory_summary_by_account_by_event_name - [ ] memory_summary_by_host_by_event_name - [ ] memory_summary_by_thread_by_event_name - [ ] memory_summary_by_user_by_event_name - [ ] memory_summary_global_by_event_name - [ ] metadata_locks - [ ] mutex_instances - [ ] objects_summary_global_by_type - [ ] performance_timers - [ ] prepared_statements_instances - [ ] replication_applier_configuration - [ ] replication_applier_status - [ ] replication_applier_status_by_coordinator - [ ] replication_applier_status_by_worker - [ ] replication_connection_configuration - [ ] replication_connection_status - [ ] replication_group_member_stats - [ ] replication_group_members - [ ] rwlock_instances - [ ] session_account_connect_attrs - [ ] session_connect_attrs - [ ] session_status - [ ] session_variables - [ ] setup_actors - [ ] setup_consumers - [ ] setup_instruments - [ ] setup_objects - [ ] setup_timers - [ ] socket_instances - [ ] socket_summary_by_event_name - [ ] socket_summary_by_instance - [ ] status_by_account - [ ] status_by_host - [ ] status_by_thread - [ ] status_by_user - [ ] table_handles - [ ] table_io_waits_summary_by_index_usage - [ ] table_io_waits_summary_by_table - [ ] table_lock_waits_summary_by_table - [ ] threads - [ ] user_variables_by_thread - [ ] users - [ ] variables_by_thread ### sys - [ ] sys_config ## PostgreSQL PostgreSQL contains two system schemas, information_schema and pg_catalog Among them, information_schema has 4 tables and 65 views pg_catalog has 62 tables and 72 views. ### information_schema #### tables - [ ] sql_features - [ ] sql_implementation_info - [ ] sql_parts - [ ] sql_sizing #### views - [ ] _pg_foreign_data_wrappers - [ ] _pg_foreign_servers - [ ] _pg_foreign_table_columns - [ ] _pg_foreign_tables - [ ] _pg_user_mappings - [ ] administrable_role_authorizations - [ ] applicable_roles - [ ] attributes - [ ] character_sets - [ ] check_constraint_routine_usage - [ ] check_constraints - [ ] collation_character_set_applicability - [ ] collations - [ ] column_column_usage - [ ] column_domain_usage - [ ] column_options - [ ] column_privileges - [ ] column_udt_usage - [ ] columns - [ ] constraint_column_usage - [ ] constraint_table_usage - [ ] data_type_privileges - [ ] domain_constraints - [ ] domain_udt_usage - [ ] domains - [ ] element_types - [ ] enabled_roles - [ ] foreign_data_wrapper_options - [ ] foreign_data_wrappers - [ ] foreign_server_options - [ ] foreign_servers - [ ] foreign_table_options - [ ] foreign_tables - [ ] information_schema_catalog_name - [ ] key_column_usage - [ ] parameters - [ ] referential_constraints - [ ] role_column_grants - [ ] role_routine_grants - [ ] role_table_grants - [ ] role_udt_grants - [ ] role_usage_grants - [ ] routine_column_usage - [ ] routine_privileges - [ ] routine_routine_usage - [ ] routine_sequence_usage - [ ] routine_table_usage - [ ] routines - [ ] schemata - [ ] sequences - [ ] table_constraints - [ ] table_privileges - [ ] tables - [ ] transforms - [ ] triggered_update_columns - [ ] triggers - [ ] udt_privileges - [ ] usage_privileges - [ ] user_defined_types - [ ] user_mapping_options - [ ] user_mappings - [ ] view_column_usage - [ ] view_routine_usage - [ ] view_table_usage - [ ] views ### pg_catalog #### tables - [ ] pg_aggregate - [ ] pg_am - [ ] pg_amop - [ ] pg_amproc - [ ] pg_attrdef - [ ] pg_attribute - [ ] pg_auth_members - [ ] pg_authid - [ ] pg_cast - [ ] pg_class - [ ] pg_collation - [ ] pg_constraint - [ ] pg_conversion - [ ] pg_database - [ ] pg_db_role_setting - [ ] pg_default_acl - [ ] pg_depend - [ ] pg_description - [ ] pg_enum - [ ] pg_event_trigger - [ ] pg_extension - [ ] pg_foreign_data_wrapper - [ ] pg_foreign_server - [ ] pg_foreign_table - [ ] pg_index - [ ] pg_inherits - [ ] pg_init_privs - [ ] pg_language - [ ] pg_largeobject - [ ] pg_largeobject_metadata - [ ] pg_namespace - [ ] pg_opclass - [ ] pg_operator - [ ] pg_opfamily - [ ] pg_partitioned_table - [ ] pg_policy - [ ] pg_proc - [ ] pg_publication - [ ] pg_publication_rel - [ ] pg_range - [ ] pg_replication_origin - [ ] pg_rewrite - [ ] pg_seclabel - [ ] pg_sequence - [ ] pg_shdepend - [ ] pg_shdescription - [ ] pg_shseclabel - [ ] pg_statistic - [ ] pg_statistic_ext - [ ] pg_statistic_ext_data - [ ] pg_subscription - [ ] pg_subscription_rel - [ ] pg_tablespace - [ ] pg_transform - [ ] pg_trigger - [ ] pg_ts_config - [ ] pg_ts_config_map - [ ] pg_ts_dict - [ ] pg_ts_parser - [ ] pg_ts_template - [ ] pg_type - [ ] pg_user_mapping #### views - [ ] pg_available_extension_versions - [ ] pg_available_extensions - [ ] pg_backend_memory_contexts - [ ] pg_config - [ ] pg_cursors - [ ] pg_file_settings - [ ] pg_group - [ ] pg_hba_file_rules - [ ] pg_indexes - [ ] pg_locks - [ ] pg_matviews - [ ] pg_policies - [ ] pg_prepared_statements - [ ] pg_prepared_xacts - [ ] pg_publication_tables - [ ] pg_replication_origin_status - [ ] pg_replication_slots - [ ] pg_roles - [ ] pg_rules - [ ] pg_seclabels - [ ] pg_sequences - [ ] pg_settings - [ ] pg_shadow - [ ] pg_shmem_allocations - [ ] pg_stat_activity - [ ] pg_stat_all_indexes - [ ] pg_stat_all_tables - [ ] pg_stat_archiver - [ ] pg_stat_bgwriter - [ ] pg_stat_database - [ ] pg_stat_database_conflicts - [ ] pg_stat_gssapi - [ ] pg_stat_progress_analyze - [ ] pg_stat_progress_basebackup - [ ] pg_stat_progress_cluster - [ ] pg_stat_progress_copy - [ ] pg_stat_progress_create_index - [ ] pg_stat_progress_vacuum - [ ] pg_stat_replication - [ ] pg_stat_replication_slots - [ ] pg_stat_slru - [ ] pg_stat_ssl - [ ] pg_stat_subscription - [ ] pg_stat_sys_indexes - [ ] pg_stat_sys_tables - [ ] pg_stat_user_functions - [ ] pg_stat_user_indexes - [ ] pg_stat_user_tables - [ ] pg_stat_wal - [ ] pg_stat_wal_receiver - [ ] pg_stat_xact_all_tables - [ ] pg_stat_xact_sys_tables - [ ] pg_stat_xact_user_functions - [ ] pg_stat_xact_user_tables - [ ] pg_statio_all_indexes - [ ] pg_statio_all_sequences - [ ] pg_statio_all_tables - [ ] pg_statio_sys_indexes - [ ] pg_statio_sys_sequences - [ ] pg_statio_sys_tables - [ ] pg_statio_user_indexes - [ ] pg_statio_user_sequences - [ ] pg_statio_user_tables - [ ] pg_stats - [ ] pg_stats_ext - [ ] pg_stats_ext_exprs - [ ] pg_tables - [ ] pg_timezone_abbrevs - [ ] pg_timezone_names - [ ] pg_user - [ ] pg_user_mappings - [ ] pg_views ## openGauss openGauss has two system schemas, `information_schema` and `pg_cataglog`. `information_schema` has 7 tables, 59 views. `pg_cataglog` has 115 tables, 125 views. ### information_schema #### Tables - [ ] sql_features - [ ] sql_implementation_info - [ ] sql_languages - [ ] sql_packages - [ ] sql_parts - [ ] sql_sizing - [ ] sql_sizing_profiles #### Views - [ ] _pg_foreign_data_wrappers - [ ] _pg_foreign_servers - [ ] _pg_foreign_table_columns - [ ] _pg_foreign_tables - [ ] _pg_user_mappings - [ ] administrable_role_authorizations - [ ] applicable_roles - [ ] attributes - [ ] character_sets - [ ] check_constraint_routine_usage - [ ] check_constraints - [ ] collation_character_set_applicability - [ ] collations - [ ] column_domain_usage - [ ] column_options - [ ] column_privileges - [ ] column_udt_usage - [ ] columns - [ ] constraint_column_usage - [ ] constraint_table_usage - [ ] data_type_privileges - [ ] domain_constraints - [ ] domain_udt_usage - [ ] domains - [ ] element_types - [ ] enabled_roles - [ ] foreign_data_wrapper_options - [ ] foreign_data_wrappers - [ ] foreign_server_options - [ ] foreign_servers - [ ] foreign_table_options - [ ] foreign_tables - [ ] information_schema_catalog_name - [ ] key_column_usage - [ ] parameters - [ ] referential_constraints - [ ] role_column_grants - [ ] role_routine_grants - [ ] role_table_grants - [ ] role_udt_grants - [ ] role_usage_grants - [ ] routine_privileges - [ ] routines - [ ] schemata - [ ] sequences - [ ] table_constraints - [ ] table_privileges - [ ] tables - [ ] triggered_update_columns - [ ] triggers - [ ] udt_privileges - [ ] usage_privileges - [ ] user_defined_types - [ ] user_mapping_options - [ ] user_mappings - [ ] view_column_usage - [ ] view_routine_usage - [ ] view_table_usage - [ ] views ### pg_cataglog #### Tables - [ ] gs_asp - [ ] gs_auditing_policy - [ ] gs_auditing_policy_access - [ ] gs_auditing_policy_filters - [ ] gs_auditing_policy_privileges - [ ] gs_client_global_keys - [ ] gs_client_global_keys_args - [ ] gs_column_keys - [ ] gs_column_keys_args - [ ] gs_db_privilege - [ ] gs_encrypted_columns - [ ] gs_encrypted_proc - [ ] gs_global_chain - [ ] gs_global_config - [ ] gs_job_argument - [ ] gs_job_attribute - [ ] gs_masking_policy - [ ] gs_masking_policy_actions - [ ] gs_masking_policy_filters - [ ] gs_matview - [ ] gs_matview_dependency - [ ] gs_model_warehouse - [ ] gs_obsscaninfo - [ ] gs_opt_model - [ ] gs_package - [ ] gs_policy_label - [ ] gs_recyclebin - [ ] gs_txn_snapshot - [ ] gs_uid - [ ] gs_wlm_ec_operator_info - [ ] gs_wlm_instance_history - [ ] gs_wlm_operator_info - [ ] gs_wlm_plan_encoding_table - [ ] gs_wlm_plan_operator_info - [ ] gs_wlm_session_query_info_all - [ ] gs_wlm_user_resource_history - [ ] pg_aggregate - [ ] pg_am - [ ] pg_amop - [ ] pg_amproc - [ ] pg_app_workloadgroup_mapping - [ ] pg_attrdef - [ ] pg_attribute - [ ] pg_auth_history - [ ] pg_auth_members - [ ] pg_authid - [ ] pg_cast - [ ] pg_class - [ ] pg_collation - [ ] pg_constraint - [ ] pg_conversion - [ ] pg_database - [ ] pg_db_role_setting - [ ] pg_default_acl - [ ] pg_depend - [ ] pg_description - [ ] pg_directory - [ ] pg_enum - [ ] pg_extension - [ ] pg_extension_data_source - [ ] pg_foreign_data_wrapper - [ ] pg_foreign_server - [ ] pg_foreign_table - [ ] pg_hashbucket - [ ] pg_index - [ ] pg_inherits - [ ] pg_job - [ ] pg_job_proc - [ ] pg_language - [ ] pg_largeobject - [ ] pg_largeobject_metadata - [ ] pg_namespace - [ ] pg_object - [ ] pg_obsscaninfo - [ ] pg_opclass - [ ] pg_operator - [ ] pg_opfamily - [ ] pg_partition - [ ] pg_pltemplate - [ ] pg_proc - [ ] pg_publication - [ ] pg_publication_rel - [ ] pg_range - [ ] pg_replication_origin - [ ] pg_resource_pool - [ ] pg_rewrite - [ ] pg_rlspolicy - [ ] pg_seclabel - [ ] pg_shdepend - [ ] pg_shdescription - [ ] pg_shseclabel - [ ] pg_statistic - [ ] pg_statistic_ext - [ ] pg_subscription - [ ] pg_synonym - [ ] pg_tablespace - [ ] pg_trigger - [ ] pg_ts_config - [ ] pg_ts_config_map - [ ] pg_ts_dict - [ ] pg_ts_parser - [ ] pg_ts_template - [ ] pg_type - [ ] pg_user_mapping - [ ] pg_user_status - [ ] pg_workload_group - [ ] pgxc_class - [ ] pgxc_group - [ ] pgxc_node - [ ] pgxc_slice - [ ] plan_table_data - [ ] statement_history - [ ] streaming_cont_query - [ ] streaming_reaper_status - [ ] streaming_stream #### Views - [ ] get_global_prepared_xacts - [ ] gs_all_control_group_info - [ ] gs_auditing - [ ] gs_auditing_access - [ ] gs_auditing_privilege - [ ] gs_cluster_resource_info - [ ] gs_comm_proxy_thread_status - [ ] gs_db_privileges - [ ] gs_file_stat - [ ] gs_get_control_group_info - [ ] gs_gsc_memory_detail - [ ] gs_instance_time - [ ] gs_labels - [ ] gs_lsc_memory_detail - [ ] gs_masking - [ ] gs_matviews - [ ] gs_os_run_info - [ ] gs_redo_stat - [ ] gs_session_cpu_statistics - [ ] gs_session_memory - [ ] gs_session_memory_context - [ ] gs_session_memory_detail - [ ] gs_session_memory_statistics - [ ] gs_session_stat - [ ] gs_session_time - [ ] gs_shared_memory_detail - [ ] gs_sql_count - [ ] gs_stat_session_cu - [ ] gs_thread_memory_context - [ ] gs_total_memory_detail - [ ] gs_total_nodegroup_memory_detail - [ ] gs_wlm_cgroup_info - [ ] gs_wlm_ec_operator_history - [ ] gs_wlm_ec_operator_statistics - [ ] gs_wlm_operator_history - [ ] gs_wlm_operator_statistics - [ ] gs_wlm_plan_operator_history - [ ] gs_wlm_rebuild_user_resource_pool - [ ] gs_wlm_resource_pool - [ ] gs_wlm_session_history - [ ] gs_wlm_session_info - [ ] gs_wlm_session_info_all - [ ] gs_wlm_session_statistics - [ ] gs_wlm_user_info - [ ] gs_wlm_workload_records - [ ] mpp_tables - [ ] pg_available_extension_versions - [ ] pg_available_extensions - [ ] pg_comm_delay - [ ] pg_comm_recv_stream - [ ] pg_comm_send_stream - [ ] pg_comm_status - [ ] pg_control_group_config - [ ] pg_cursors - [ ] pg_ext_stats - [ ] pg_get_invalid_backends - [ ] pg_get_senders_catchup_time - [ ] pg_group - [ ] pg_gtt_attached_pids - [ ] pg_gtt_relstats - [ ] pg_gtt_stats - [ ] pg_indexes - [ ] pg_locks - [ ] pg_node_env - [ ] pg_os_threads - [ ] pg_prepared_statements - [ ] pg_prepared_xacts - [ ] pg_publication_tables - [ ] pg_replication_origin_status - [ ] pg_replication_slots - [ ] pg_rlspolicies - [ ] pg_roles - [ ] pg_rules - [ ] pg_running_xacts - [ ] pg_seclabels - [ ] pg_session_iostat - [ ] pg_session_wlmstat - [ ] pg_settings - [ ] pg_shadow - [ ] pg_stat_activity - [ ] pg_stat_activity_ng - [ ] pg_stat_all_indexes - [ ] pg_stat_all_tables - [ ] pg_stat_bad_block - [ ] pg_stat_bgwriter - [ ] pg_stat_database - [ ] pg_stat_database_conflicts - [ ] pg_stat_replication - [ ] pg_stat_subscription - [ ] pg_stat_sys_indexes - [ ] pg_stat_sys_tables - [ ] pg_stat_user_functions - [ ] pg_stat_user_indexes - [ ] pg_stat_user_tables - [ ] pg_stat_xact_all_tables - [ ] pg_stat_xact_sys_tables - [ ] pg_stat_xact_user_functions - [ ] pg_stat_xact_user_tables - [ ] pg_statio_all_indexes - [ ] pg_statio_all_sequences - [ ] pg_statio_all_tables - [ ] pg_statio_sys_indexes - [ ] pg_statio_sys_sequences - [ ] pg_statio_sys_tables - [ ] pg_statio_user_indexes - [ ] pg_statio_user_sequences - [ ] pg_statio_user_tables - [ ] pg_stats - [ ] pg_tables - [ ] pg_tde_info - [ ] pg_thread_wait_status - [ ] pg_timezone_abbrevs - [ ] pg_timezone_names - [ ] pg_total_memory_detail - [ ] pg_total_user_resource_info - [ ] pg_total_user_resource_info_oid - [ ] pg_user - [ ] pg_user_mappings - [ ] pg_variable_info - [ ] pg_views - [ ] pg_wlm_statistics - [ ] pgxc_prepared_xacts - [ ] pgxc_thread_wait_status - [ ] plan_table - [ ] sys_dummy ### Is your feature request related to a problem? ### Describe the feature you would like. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
