diff --git a/pkg/cloudql/sdk/extra/rego/rego.go b/pkg/cloudql/sdk/extra/rego/rego.go index 6b0431611..c95780a10 100644 --- a/pkg/cloudql/sdk/extra/rego/rego.go +++ b/pkg/cloudql/sdk/extra/rego/rego.go @@ -84,7 +84,8 @@ func NewRegoEngine(ctx context.Context, logger *zap.Logger) { } func (r *RegoEngine) getRegoFunctionForTables(ctx context.Context) ([]func(*rego.Rego), error) { - rows, err := r.db.Query(ctx, "SELECT table_name FROM information_schema.tables WHERE table_schema NOT IN ($1)", excludedTableSchema) + + rows, err := r.db.Query(ctx, "SELECT table_name FROM information_schema.tables WHERE table_schema value != any ($1)", excludedTableSchema) if err != nil { r.logger.Error("Unable to query database", zap.Error(err)) return nil, err