PostgreSQL via domain socket

Hello, i’m trying to set up my server using the PostgreSQL, and i would like to have the teamspeak server connect to the PostgreSQL server by using domain sockets. This should avoid the need for any passwords, but still provide some local security, see the PostgreSQL documentation.

reading ts3_server_quickstart.txt though, i cannot find any mention of a method to specify the path to a socket, nor does the PostgreSQL plugin seem to support support the PostgreSQL connstring syntax. I also tried to enter the socket via the host by using the percent encoding described in the previous url, but that didn’t work either. There is a mention for connection to a MariaDB server with a socket though. Is this at all possible using the PostgreSQL database plugin?

If anyone else also wants to do this in the future, i figured out that the teamspeak postgresql plugin uses hostaddr instead of host to specify the host of the postgresql database, see the documentation. I managed to make teamspeak connect via host instead by executing

sed --in-place= 's/hostaddr=/    host=/' libts3db_postgresql.so

this command literally just replaces the hostaddr string in the postgresql plugin with host, after which i specify an empty host value in my .ini file in order to connect via domain socket.

If any teamspeak 3 developer is reading this, i don’t think there should be any downsides to replacing hostaddr with host in the upstream binary.