Cannot link against libpq on macOS

2023-09-20 Thread A. Reichstadt
Hello, I have been struggling with trying to use a current version of libpq to link against on macOS in Xcode. It seems that nothing works, nobody on the web eventually succeeded either as far as I found so far. I try to write a small sample client. I started with the public source download to

Re: How to deny access to Postgres when connected from host/non-local

2021-04-05 Thread A. Reichstadt
Thanks, works. Sent from my iPhone > On Apr 3, 2021, at 11:02, Joe Conway wrote: > > On 4/2/21 7:06 PM, A. Reichstadt wrote: >> Hello, >> I try to deny access to all databases on my server if the user “postgres" >> tries to connect from a non-local host. H

How to deny access to Postgres when connected from host/non-local

2021-04-03 Thread A. Reichstadt
Hello, I try to deny access to all databases on my server if the user “postgres" tries to connect from a non-local host. Here is what I did in pg_hba.conf: # TYPE DATABASEUSERADDRESS METHOD # "local" is for Unix domain socket connections only local all

Re: Trigger function always logs postgres as user name

2019-02-15 Thread Alexander Reichstadt
HI, The answer to the question is that you need to use session_user instead of user or current_user. Cheers, Alex > On 9 Feb 2019, at 10:08, Alexander Reichstadt wrote: > > Hi, > > I setup trigger functions for logging, and while they do work and get > triggered, the c

Trigger function always logs postgres as user name

2019-02-09 Thread Alexander Reichstadt
Hi, I setup trigger functions for logging, and while they do work and get triggered, the current_user always insert “postgres” even when updates/deletes/inserts are caused by users of another name. How do I get it to use the name that caused the update? It seems current_user is the trigger’s