Re: Playing with pgcrypto

2022-10-10 Thread howardnews
pgp_sym_encrypt uses a random salt each time, so you cannot compare the output to p1 like you would do with crypt to verify a given plaintext. Instead, use pgp_sym_decrypt with p1 as input to get the plaintext. -- Erik Ah! That makes sense. Thanks Erik!

Playing with pgcrypto

2022-10-10 Thread howardnews
Hi all, I am trying out a few pgcrypto functions. I was expecting the final select statement to return the row I just inserted - Can anyone tell me what I am not understanding here? create table test (p1 bytea); insert into test (pgp_sym_encrypt('123', 'secret')); select * from test where pgp

Re: Could not load server certificate file "server.crt": No such file or directory.

2022-08-12 Thread howardnews
set ssl on. Check postgresql.conf to verify. If you don't want SSL on then set to off. If you want it on and need a certificate see: https://www.postgresql.org/docs/14/ssl-tcp.html#SSL-CERTIFICATE-CREATION You were right. Many thanks Howard.

Could not load server certificate file "server.crt": No such file or directory.

2022-08-12 Thread howardnews
Hi, Running 14.4.1 on Mac OSX on M1 and found that the postgres daemon had not started. It was running fine previously. When I ran the following command line: sudo -u postgres /Library/Postgresql/14/bin/postmaster -D /Library/Postgresql/14/data I get the following error: 2022-08-12 17:47:

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-08-01 Thread howardnews
On 2022-08-01 04:06, Adrian Klaver wrote: 2022-08-01T00:20:18.530Z Connection-1 finer] Created socket [2022-08-01T00:20:18.532Z Connection-1 fine] Opening connection to port 5432 on host localhost 2022-08-01 01:20:18.534308+0100 TestPostgres[10654:120173] dnssd_clientstub ConnectToServer: conne

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread howardnews
On 2022-08-01 01:04, Adrian Klaver wrote: On 7/31/22 16:53, howardn...@selestial.com wrote: On 2022-07-31 23:42, Rob Sargent wrote: On 7/31/22 16:40, howardn...@selestial.com wrote: Hi, Wondered if anyone had experience connection to pg14.1 running on OSX using the swift library PostgresClie

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread howardnews
On 2022-08-01 01:04, Adrian Klaver wrote: On 7/31/22 16:53, howardn...@selestial.com wrote: On 2022-07-31 23:42, Rob Sargent wrote: On 7/31/22 16:40, howardn...@selestial.com wrote: Hi, Wondered if anyone had experience connection to pg14.1 running on OSX using the swift library PostgresClie

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread howardnews
On 2022-08-01 01:02, Tom Lane wrote: howardn...@selestial.com writes: On 2022-07-31 23:42, Rob Sargent wrote: On 7/31/22 16:40, howardn...@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]

Re: Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread howardnews
On 2022-07-31 23:42, Rob Sargent wrote: On 7/31/22 16:40, howardn...@selestial.com wrote: 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 trac

Connecting to postgres on OSX from Swift using PostgresClientKit

2022-07-31 Thread howardnews
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 = ConnectionConfigu