Standard libpq supports an option hostaddr which allows the dialer to avoid a DNS lookup. More importantly for my case, it allows a connection with sslmode=verify-full even though my connection is going via a local SSH tunnel to the remote Postgres server.
@evantorrie If you supply an IP address to host the underlying call to net.Dial(...) already avoids the DNS lookup. Is your use case to supply both host and hostaddr in a single connection string?
Standard libpq supports an option
hostaddr
which allows the dialer to avoid a DNS lookup. More importantly for my case, it allows a connection withsslmode=verify-full
even though my connection is going via a local SSH tunnel to the remote Postgres server.