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
I tried to do custom dialing using this example: #470 (comment)
type drvWrapper struct{} type customDialer struct{} func (d *drvWrapper) Open(name string) (driver.Conn, error) { return pq.DialOpen(customDialer{}, name) } func (customDialer) Dial(network, address string) (net.Conn, error) { return net.Dial(network, address) } func (customDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) { return net.DialTimeout(network, address, timeout) } func init() { sql.Register("mypq", &drvWrapper{}) }
And then create a DB through sqlx:
DB
sqlx
db := sqlx.MustOpen("mypq", "postgres://"+cfg.Postgres.DSN())
I encountered this error: "pq: syntax error at end of input"
But when I switched back the default driver name:
db := sqlx.MustOpen("postgres", "postgres://"+cfg.Postgres.DSN())
The error immediately went away. Could anyone help me point out the problem? Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried to do custom dialing using this example:
#470 (comment)
And then create a
DB
throughsqlx
:I encountered this error: "pq: syntax error at end of input"
But when I switched back the default driver name:
The error immediately went away.
Could anyone help me point out the problem? Thanks
The text was updated successfully, but these errors were encountered: