You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
(Documentation) sqlx.In should be used with (?) instead of ($1) for postgres #959
Good catch — this is a common stumbling block with sqlx.
sqlex (https://github.com/go-sqlex/sqlex) handles this automatically: you write ? everywhere in your code, and it rebinds to the correct placeholder ($1, @p1, etc.) behind the scenes based on the database driver you're using. No need to think about which syntax to use. @zachczx
Activity
suiriass commentedon Jun 30, 2026
Good catch — this is a common stumbling block with sqlx.
sqlex(https://github.com/go-sqlex/sqlex) handles this automatically: you write?everywhere in your code, and it rebinds to the correct placeholder ($1,@p1, etc.) behind the scenes based on the database driver you're using. No need to think about which syntax to use. @zachczxTastyHeadphones commentedon Sep 27, 2026
Opened a PR clarifying that
sqlx.Inalways uses?(then Rebind): #1003