jeremyevans / sequel

Sequel: The Database Toolkit for Ruby
http://sequel.jeremyevans.net
Other
5k stars 1.07k forks source link

Add support for hostaddr param in postgres #2098

Closed mscrivo closed 1 year ago

mscrivo commented 1 year ago

This is useful for when you want to tell your connection specifically which host IP to connect to but still optionally use hostname for authentication with tls.

Supported in pg gem since 1.4.0 and postgres since version 12. I'm not sure if we need to codify those constraints?

jeremyevans commented 1 year ago

I think this is supported already via driver_options: {hostparam: '12.34.56.78'}. Can you try that and see if it works? If so, I don't think we want to add another top-level specific option for it, as the need for it seems uncommon.

mscrivo commented 1 year ago

I think this is supported already via driver_options: {hostparam: '12.34.56.78'}. Can you try that and see if it works? If so, I don't think we want to add another top-level specific option for it, as the need for it seems uncommon.

ah I didn't realize that was a thing, I'll give that a shot and let you know. Thanks!

mscrivo commented 1 year ago

driver_options: {hostaddr: '12.34.56.78'} did indeed work! Thanks @jeremyevans