Re: Connecting to postgres on OSX from Swift using PostgresClientKit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Connecting to postgres on OSX from Swift using PostgresClientKit
Дата
Msg-id 1504414.1659312172@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Connecting to postgres on OSX from Swift using PostgresClientKit  (howardnews@selestial.com)
Ответы Re: Connecting to postgres on OSX from Swift using PostgresClientKit  (howardnews@selestial.com)
Список pgsql-general
howardnews@selestial.com writes:
> On 2022-07-31 23:42, Rob Sargent wrote:
>> On 7/31/22 16:40, howardnews@selestial.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.

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



В списке pgsql-general по дате отправления:

Предыдущее
От: howardnews@selestial.com
Дата:
Сообщение: Re: Connecting to postgres on OSX from Swift using PostgresClientKit
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Connecting to postgres on OSX from Swift using PostgresClientKit