I'm only able to replicate this when ssh sends over my LC_*, so I end up on a server not having the locale I'm using on my client.
Weather this is postgres package issue or openssh-client package issue I do not know.
But this is easily circumvented by commenting out "SendEnv LANG LC_*" in /etc/ssh/ssh_config on your local workstation.
I'm only able to replicate this when ssh sends over my LC_*, so I end up on a server not having the locale I'm using on my client.
Weather this is postgres package issue or openssh-client package issue I do not know.
But this is easily circumvented by commenting out "SendEnv LANG LC_*" in /etc/ssh/ssh_config on your local workstation.