Just got bitten by a property test that tried to save a string with a zero byte in it to the database + got it silently truncated. I know that's the documented behavior in libpq, but it seems less than ideal in Haskell, a language that can contain zero bytes in strings unlike C.
Or perhaps it should be documented in escapeStringConn to look at the libpq docs for edge cases? In this case, should the postgresql-simple library throw an error? I'd understand postgresql-libpq not wanting to deviate from libpq behavior, but it seems like a good thing to catch unexpected behavior in postgresql-simple (I only bring it up because it seems like the authors of the two libraries are the same)