Skip to content

Commit

Permalink
Add support for pg_catalog.pg_inherits table
Browse files Browse the repository at this point in the history
  • Loading branch information
exAspArk committed Dec 13, 2024
1 parent ed640f7 commit 6839621
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 290 deletions.
2 changes: 1 addition & 1 deletion src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"
)

const VERSION = "0.25.2"
const VERSION = "0.26.0"

func main() {
config := LoadConfig()
Expand Down
9 changes: 3 additions & 6 deletions src/query_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,22 @@ func TestHandleQuery(t *testing.T) {
"description": {"nspname"},
"values": {"public"},
},
// pg_statio_user_tables
"SELECT pg_total_relation_size(relid) AS total_size FROM pg_catalog.pg_statio_user_tables WHERE schemaname = 'public'": {
"description": {"total_size"},
"values": {},
},
"SELECT pg_total_relation_size(relid) AS total_size FROM pg_catalog.pg_statio_user_tables WHERE schemaname = 'public' UNION SELECT NULL AS total_size FROM pg_catalog.pg_proc p LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace WHERE n.nspname = 'public'": {
"description": {"total_size"},
"values": {},
},
// pg_shdescription
"SELECT * FROM pg_catalog.pg_shdescription": {
"description": {"objoid", "classoid", "description"},
"values": {"0", "0", "NULL"},
},
// pg_roles
"SELECT * FROM pg_catalog.pg_roles": {
"description": {"oid", "rolname", "rolsuper", "rolinherit", "rolcreaterole", "rolcreatedb", "rolcanlogin", "rolreplication", "rolconnlimit", "rolpassword", "rolvaliduntil", "rolbypassrls", "rolconfig"},
"values": {"10", "bemidb", "true", "true", "true", "true", "true", "false", "-1", "NULL", "NULL", "false", "NULL"},
},
"SELECT * FROM pg_catalog.pg_inherits": {
"description": {"inhrelid", "inhparent", "inhseqno", "inhdetachpending"},
},
// Information schema
"SELECT * FROM information_schema.tables": {
"description": {"table_catalog", "table_schema", "table_name", "table_type", "self_referencing_column_name", "reference_generation", "user_defined_type_catalog", "user_defined_type_schema", "user_defined_type_name", "is_insertable_into", "is_typed", "commit_action", "TABLE_COMMENT"},
Expand Down
Loading

0 comments on commit 6839621

Please sign in to comment.