doug-martin / goqu

SQL builder and query library for golang
http://doug-martin.github.io/goqu/
MIT License
2.37k stars 207 forks source link

Prepared(true) does not work with postgres #427

Open veqryn opened 1 month ago

veqryn commented 1 month ago

Describe the bug When using .Prepared(true) it replaces the interpolated arguments with ?, even though Postgres is expecting $1, $2, etc.

Expected behavior I expect it to use the correct parameter format.

Dialect:

Additional context

  1. Why is interpolation the default?
  2. Why did goqu go to all the trouble to write an interpolation layer, when every database takes parameters? It seems much much safer to let Postgres do the interpolation, rather than just a library to do it.