#Erroneous Postgres query in Go, need help
6 messages · Page 1 of 1 (latest)
using fmt.Sprintf
and https://pkg.go.dev/github.com/jackc/pgx#Identifier.Sanitize
use that to sanitize the table name. i believe identifier, table, col etc must be a constant.
What specific database are you using? Different database have different format type
Idk if you can change the table name as $1?
Yes, Sprintf for table name will help