Skip to content

Commit

Permalink
avoid sql placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Feb 15, 2024
1 parent c0bc2ea commit 3eb09d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/connectors/postgres/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ func (c *PostgresConnector) CheckReplicationPermissions(ctx context.Context, use
}

var replicationRes bool
err := c.conn.QueryRow(ctx, "SELECT rolreplication FROM pg_roles WHERE rolname = $1", username).Scan(&replicationRes)
err := c.conn.QueryRow(ctx, "SELECT rolreplication FROM pg_roles WHERE rolname = "+
QuoteLiteral(username)).Scan(&replicationRes)
if err != nil {
return err
}
Expand Down

0 comments on commit 3eb09d7

Please sign in to comment.