bmizerany / pq

MIT License
181 stars 30 forks source link

Support SetMaxIdleConns #8

Closed izaurio closed 10 years ago

izaurio commented 11 years ago
db, err := sql.Open("...")
db.SetMaxIdleConns(12)

Error: db.SetMaxIdleConns undefined (type *sql.DB has no field or method SetMaxIdleConns)

Be able to implement it?

fdr commented 11 years ago

That would be wonderful. I think it's backwards compatible with older Gos, too. @deafbybeheading may be interested.

msakrejda commented 11 years ago

Looks like this is Go 1.1 (not to mention that it's of limited usefulness if it only caps max idle connections).

But we could introduce version-dependent tags:

When checking out or updating a package, get looks for a branch or tag that matches the locally installed version of Go. The most important rule is that if the local installation is running version "go1", get searches for a branch or tag named "go1". If no such version exists it retrieves the most recent version of the package.

(see here)

bmizerany commented 10 years ago

Closing. Please re-post at http://github.com/lib/pq if there is still a problem.