vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

Unable to Connect to Postgresql on other port

Open cheanwei opened this issue 2 years ago • 3 comments

I created a Postresql connection in the SQLTools settings with port number 35433. However following error was captured in the log output.

[1551681558188] ERROR (ls): Connecting error: {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}},"name":"Error"} ns: "conn-manager" [1638795210289] ERROR (ext): ERROR: Error opening connection getaddrinfo ENOTFOUND postgresql postgresql:5432, {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}}} ns: "error-handler"

Note that I already installed the PostgreSQL/Redshift driver extension.

Expected behavior The connection should be successful. The log should display port 35433 instead of 5432. I use the same connection string and credential is used on other database client, it work correctly.

Desktop (please complete the following information):

  • SQLTools Version: v0.23.0
  • VSCode Version: 1.62.3
  • OS: Mac
  • Driver:
    • [ ] PostgreSQL/Redshift
  • Database version: [PostgreSQL 9.6.24]

cheanwei avatar Dec 06 '21 13:12 cheanwei

Was this issue ever resolved? I'm having a similar error.

Error opening connection getaddrinfo ENOTFOUND

jacobhalstead avatar Jun 01 '22 18:06 jacobhalstead

See also #871

gjsjohnmurray avatar Jul 22 '22 22:07 gjsjohnmurray

Is it possible you also have a workspace-level definition? See #872

gjsjohnmurray avatar Jul 22 '22 22:07 gjsjohnmurray