But why?
The edge is in general not the users browser.
So you can do a TLS/postgres connection instead of adding additional layers.
Sure you want to probably run a patched pg client/server which has various optimizations to reduce the number of round trips when opening a connection, but that also applies to any HTTP/WebSocket wrapper.