Re: Connecting to postgres on OSX from Swift using PostgresClientKit

From: howardnews(at)selestial(dot)com
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rob Sargent <robjsargent(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Connecting to postgres on OSX from Swift using PostgresClientKit
Date: 2022-08-01 00:25:43
Message-ID: 03427f35037778b0fab1a6bf04297fdb@selestial.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2022-08-01 01:02, Tom Lane wrote:
> howardnews(at)selestial(dot)com writes:
>> On 2022-07-31 23:42, Rob Sargent wrote:
>>> On 7/31/22 16:40, howardnews(at)selestial(dot)com wrote:
>>>> I can successfully connect using psql and/pgadmin, but when I try
>>>> and connect in code I get the following error:
>>>> [Connection-1 Severe] Unable to connect socket: Error Code:
>>>> -9989(0x2705), Operation not permitted
>
>>> Maybe add config.host = "localhost"?
>
>> Thanks, tried localhost, 127.0.0.1 and ::128. No joy
>
> Don't know much about Swift, but it wouldn't surprise me if that
> code is running in some kind of sandbox that disallows IP
> connections by default.
>

Swift/Xcode is new to me too!

> Also, does psql work when you say "psql -h localhost"? It's
> possible that your server isn't listening on localhost, or
> there's a firewall there. Your working connections could all be
> via Unix sockets, from what little you've said so far.
>
> regards, tom lane

Using psql, i can successfully connect to localhost. In the
postgresql.conf the listen address is *.
The application was installed from the EDB installer; not sure about
firewalls on sandboxes in this situation.

Howard

In response to

Browse pgsql-general by date

  From Date Subject
Next Message howardnews 2022-08-01 00:27:09 Re: Connecting to postgres on OSX from Swift using PostgresClientKit
Previous Message Adrian Klaver 2022-08-01 00:04:14 Re: Connecting to postgres on OSX from Swift using PostgresClientKit