在浏览器运行 PostgreSQL PGlite
启动数据库
执行SQL
SELECT 'name' col, split_part(split_part(VERSION(), ',', 1), ' on ', 1) val UNION ALL SELECT 'version' col, ( SELECT split_part(setting, ' ', 1) FROM pg_settings WHERE NAME = 'server_version' ) val UNION ALL SELECT 'compile' col, split_part(VERSION(), ',', 2) val UNION ALL SELECT 'dir_install' col, ( SELECT split_part(setting, 'main', 1) FROM pg_settings WHERE NAME = 'archive_command' ) val UNION ALL SELECT 'dir_data' col, ( SELECT setting FROM pg_settings WHERE NAME = 'data_directory' ) val UNION ALL SELECT 'charset' col, ( SELECT setting FROM pg_settings WHERE NAME = 'server_encoding' ) val UNION ALL SELECT 'time_zone' col, ( SELECT setting FROM pg_settings WHERE NAME = 'TimeZone' ) val UNION ALL SELECT 'datetime' col, to_char(now(), 'YYYY-MM-DD HH24:MI:SS.MS') val UNION ALL SELECT 'max_conn' col, ( SELECT setting FROM pg_settings WHERE NAME = 'max_connections' ) val UNION ALL SELECT 'curr_conn' col, CAST(COUNT(1) AS VARCHAR) val FROM pg_stat_activity UNION ALL SELECT 'time_out' col, ( SELECT setting FROM pg_settings WHERE NAME = 'statement_timeout' ) val UNION ALL SELECT 'ignore_case' col, CASE 'a' = 'A' WHEN 't' THEN '1' ELSE '0' END val UNION ALL SELECT 'system' col, split_part(split_part(VERSION(), ',', 1), ' on ', 2) val