Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: use SET SESSION ROLE for Postgres SQL Review DML dry-run in tenant mode
Danny3109ee21de88
diff --git a/backend/plugin/advisor/utils.go b/backend/plugin/advisor/utils.goindex b0fb9a9ae9..df04a932c6 100644--- a/backend/plugin/advisor/utils.go+++ b/backend/plugin/advisor/utils.go@@ -39,7 +39,8 @@ func Query(ctx context.Context, qCtx QueryContext, connection *sql.DB, engine stif err := tx.QueryRowContext(ctx, query).Scan(&owner); err != nil {return nil, err}- if _, err := tx.ExecContext(ctx, fmt.Sprintf("SET ROLE '%s';", owner)); err != nil {+ // Use SET SESSION ROLE to match the execution logic in backend/plugin/db/pg/pg.go+ if _, err := tx.ExecContext(ctx, fmt.Sprintf("SET SESSION ROLE '%s';", owner)); err != nil {return nil, err}}