Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: filter more system objects (#9205)

Danny Xu1d762067fd29
diff --git a/backend/plugin/parser/pg/system_objects.go b/backend/plugin/parser/pg/system_objects.go
index 3fbf87cc89..df56c50a6e 100644
--- a/backend/plugin/parser/pg/system_objects.go
+++ b/backend/plugin/parser/pg/system_objects.go
@@ -126,6 +126,7 @@ var (
"pg_stat_slru": true,
}
+ // SystemSchemaWhereClause is an optimization for getting less schema objects.
SystemSchemaWhereClause = func() string {
var schemas []string
for schema := range systemSchemas {
@@ -146,7 +147,16 @@ func IsSystemDatabase(database string) bool {
func IsSystemSchema(schema string) bool {
_, ok := systemSchemas[schema]
- return ok
+ if ok {
+ return true
+ }
+ if strings.HasPrefix(schema, "pg_temp") {
+ return true
+ }
+ if strings.HasPrefix(schema, "pg_toast") {
+ return true
+ }
+ return false
}
func IsSystemTable(table string) bool {