I'm having this issue
db, err := sql.Open("postgres", "user=xxx dbname=xxx connect_timeout=5 sslmode=disable")
if err != nil {
log.Fatal(err)
}
I have no postgres installed on my localhost so sql.Open should return some error but actually it is not until I try to prepare a query and finally I get a connection refused error
stmt, err := c.DB.Prepare("SELECT id FROM services WHERE name = $1")
if err != nil {
log.Fatal(err)
}
is this an expected behaviour? or I'm missing something...