From: | howardnews(at)selestial(dot)com |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Connecting to postgres on OSX from Swift using PostgresClientKit |
Date: | 2022-07-31 22:40:14 |
Message-ID: | ee4efe672cd7b7909c68caf8a82c3ba9@selestial.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Wondered if anyone had experience connection to pg14.1 running on OSX
using the swift library PostgresClientKit.
I am having difficulties connecting and hopefully someone can put me on
the right track.
The following is the swift code I am using
[Code]
var config = ConnectionConfiguration()
config.database = "mydb"
config.user = "postgres"
config.credential = .scramSHA256(password: "mypassword")
config.port = "5432"
config.ssl = true
let connection = try PostgresClientKit.Connection(configuration:
config)
defer { connection.close() }
[/Code]
I have the following in my pg_hba.conf file:
[Code]
local all all scram-sha-256
[/Code]
I can successfully connect using psql and/pgadmin, but when I try and
connect in code I get the following error:
[Code]
[Connection-1 Severe] Unable to connect socket: Error Code:
-9989(0x2705), Operation not permitted
[/Code]
Any suggestions?
Thanks
Howard Cole
Selestial.com
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2022-07-31 22:42:54 | Re: Connecting to postgres on OSX from Swift using PostgresClientKit |
Previous Message | Christian Barthel | 2022-07-30 06:05:34 | Re: Logical replication versus pglogical on PostgreSQL 14 |