Your Question

i'm using postgresql and using DB.Raw().Scan() gorm creates a lot of connections... i had the same problem without gorm, but i solved closing Rows just after the use. How can i do the same thing with gorm?

The document you expected this should be explained

Expected answer

Comment From: li-jin-gou

refer to https://github.com/go-gorm/gorm/blob/master/finisher_api.go#L513 and It should be closed.