encoding/csv: add column level introspection capabilities #22590
Labels
FeatureRequest
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
As briefly mentioned inside certain csv.Writer comments, there are frequent use cases, particularly with Postgres bulk copy to / from, where it is useful to differentiate between unquoted and quoted empty strings.
In particular, for csv.Reader, by the time Read() returns a slice of strings, it is too late to know whether a certain empty string is a quoted empty string or an unquoted one.
My particular use case deals with determining the nullability of an empty unquoted string, but - more generally - I just wanted to see if there is any appetite towards adding such column level introspection capabilities to the standard library csv.Reader and csv.Writer, without breaking compatibility.
For Reader, this would expose an additional surface perhaps similar to:
Regards,
silviu
The text was updated successfully, but these errors were encountered: