Did I find a bug in libpq or did I just do something stupid? It's probably the latter, but it's something to investigate later. In the meantime I'm using a completely ridiculous equivalent transformation that avoids the problematic character.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!