PGProxy lets you act as both a Postgres client and server so that you can do things like log incoming queries, manipulate return data (such as obfuscating sensitive information before it gets back to the client), etc...
Currently pgproxy
requires .NET 7 or later which you can
download here. Once installed, you can run dotnet run
in
your terminal from the root directory to fire up the proxy.