See this page query Postgres, byte by byte, over TLS | Hacker News Reader