Fork me on GitHub
#sql
<
2021-02-02
>
vemv03:02:56

This nice article was in HN homepage recently https://www.commandprompt.com/blog/null-characters-workarounds-arent-good-enough/ would you find it a good idea to have a middleware-like piece of code that stripped out ascii NUL chars?

vemv03:02:44

might be cleaner to use Spec/Malli/etc in an earlier layer :thinking_face: e.g. (spec/def ::str (spec/and string? (complement has-null-chars?))) and use it as a vanilla validation along all other app-level validations

seancorfield04:02:40

I see it's a PostgreSQL-only problem, according to that article. I started reading it and I'm thinking "Really? I've never encountered this as a problem with any database!" but then I've never used PostgreSQL 🙂