How can i establish connection unity to Postgres DB
There may be assets on the Unity Asset Store to let you integrate some flavor of this DB. I have used ones to integrate SQLite and they worked quite well.
Otherwise if it is a database on a remote server, it’s like any other network resource: get it working from the PC first, then bring it up in Unity.
Networking, UnityWebRequest, WWW, Postman, curl, WebAPI, etc:
As with all network code, get it working with Postman or curl first. That makes it NOT a Unity problem. Solve the networking first. You must solve that or anything else is irrelevant.
Once you have that working, then try and port it to UnityWebRequest. If it still doesn't work, one handy debug solution is to hook up a proxy like Charles and compare the functioning output from Postman / curl to the output from Unity, and from that reason about where your issues are.
Always get network stuff working outside of Unity in either curl or PostMan, then connect a proxy such as Charles and start trying to replicate the traffic shape with UnityWebRequest.
Any other way risks wasting a lot of your time for trivial issues that only the above way will instantly reveal.
And setting up a proxy can be very helpful too, in order to compare traffic: