Tags: ubiuser/pgtype
Tags
Fix simple protocol empty array and original recursive empty array issue Original issue jackc#68 This crash occurred in the recursive assignment system used to support multidimensional arrays. This was fixed in 9639a69. However, that fix incorrectly used nil instead of an empty slice. In hindsight, it appears the fundamental error is that an assignment to a slice of a type that is not specified is handled with the recursive / reflection path. Or another way of looking at it is as an unexpected feature where []T can now be scanned if individual elements are assignable to T even if []T is not specifically handled. But this new reflection / recursive path did not handle empty arrays. This fix handles the reflection path for an empty slice by allocating an empty slice.
PreviousNext