We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func main() { // using string returns a string as expected. // var datname string // using interface{} returns a []byte var datname interface{} // db, err := sql.Open("postgres", "postgres://user:password@host:5432/database?sslmode=disable") if err != nil { log.Fatalln(err) } row := db.QueryRow("SELECT datname::text FROM pg_stat_database LIMIT 1") err = row.Scan(&datname) log.Println("datname", datname, err) }
returns a []byte when an interface{} is provided, correctly returns a string when a string is provided. It should be consistently a string.
The text was updated successfully, but these errors were encountered:
Are you using a recent version of this package? I believe text type has been returned as string since #436.
text
Sorry, something went wrong.
This works fine for me with master.
i was likely on an old version at a time. closing works for me with latest as well. my bad.
No branches or pull requests
returns a []byte when an interface{} is provided, correctly returns a string when a string is provided. It should be consistently a string.
The text was updated successfully, but these errors were encountered: