No-one has answered my original question: How can I write a CLEAN C library that emits a SQL rowset that might include NULL values? Without "empty", I cannot see a clean way to do this.
But then your library would define a null constant, and you would use that. That's how the same problem is sorted with JSON encoding.