根据文档,我正在这样做
var thingname string = "asdf";
var id int
err = database.QueryRow("SELECT id from things where thing = ?", thingname).Scan(&id)
但 Postgres 说
ERROR: syntax error at end of input at character 41
STATEMENT: SELECT id from things where thing = ?
我看不出我与演示代码有很大不同。我正在使用pq。