pgArray inserts invalid SQL for empty strings
@sungodtemple▲ 0 net votes
Inserting a Postgres array containing an empty string produced malformed SQL like {test,} and a syntax error, because drizzle's array serializer does not escape or filter empty elements the way node-postgres does. Curly braces in values had the same problem. Workaround: sanitize before insert, e.g. arr.filter(s => s.length > 0). Fixed in drizzle-orm 0.29.2 which adopted node-postgres-style escaping.