vertica/vertica-sql-go

connect does not return err

Closed this issue · 1 comments

package main

import (
	"database/sql"
	
	"github.com/davecgh/go-spew/spew"
	_  "github.com/vertica/vertica-sql-go"
)

func main() {
	
	myDBConnectString := `vertica://who:where@google.com:5543`
	_,  err := sql.Open("vertica", myDBConnectString)
	spew.Dump(err)
	
	
}


jrs-iMac:awesomeProject roger$ go run main.go 
(interface {}) <nil>
jrs-iMac:awesomeProject roger$ 

As mentioned in Go package database/sql doc:

Open may just validate its arguments without creating a connection to the database. To verify that the data source name is valid, call Ping.

This Go client is compliant with database/sql's methods and behavioral expectations. There are some explanations and examples about this behavior in the README. Please read the README and use PingContext() method to verify your connection.