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
Hi,
trying to figure out how to use pq for the very first time, a strange error message appeared:
x509: certificate is valid for pc01, not localhost exit status 1
postgres-11 is working in my Ubuntu 18.04.01 Server Edition:
postgres@pc01:~$ psql psql (11.1 (Ubuntu 11.1-3.pgdg18.04+1)) postgres=# SELECT version(); version --------------------------------------------------------------------------------------------------------- - PostgreSQL 11.1 (Ubuntu 11.1-3.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0, 64-bit postgres=# SELECT * FROM weather; city | temp_lo | temp_hi | prcp | date ---------------+---------+---------+------+------------ San Francisco | 46 | 50 | 0.25 | 1994-11-27 Hayward | 37 | 54 | | 1994-11-29 San Francisco | 43 | 57 | 0 | 1994-11-29 (3 rows)
This is the piece of code I'm trying to make it working:
package main import ( "log" "database/sql" _ "github.com/lib/pq" ) var db *sql.DB type Row struct { city string temp_lo int temp_hi int prcp float32 date string } func main() { connStr := "user=pqtest dbname=mydb sslmode=verify-full" db, err := sql.Open("postgres", connStr) if err != nil { log.Fatal(err) } defer rows.Close() for rows.Next() { } }
And this is the go version installed:
go version go1.10.4 linux/amd64
What am I missing? Looking forward to your kind help. Marco
The text was updated successfully, but these errors were encountered:
Have you tried deleting sslmode=verify-full? (Or add host=pc01, which I assume is your hostname)
sslmode=verify-full
host=pc01
Sorry, something went wrong.
No branches or pull requests
Hi,
trying to figure out how to use pq for the very first time, a strange error message appeared:
postgres-11 is working in my Ubuntu 18.04.01 Server Edition:
This is the piece of code I'm trying to make it working:
And this is the go version installed:
What am I missing?
Looking forward to your kind help.
Marco
The text was updated successfully, but these errors were encountered: