mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Original issue https://github.com/jackc/pgtype/issues/68 This crash occurred in the recursive assignment system used to support multidimensional arrays. This was fixed in 9639a69d451f55456f598c1aa8b93053f8df3088. 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.
pgtype
pgtype implements Go types for over 70 PostgreSQL types. pgtype is the type system underlying the
https://github.com/jackc/pgx PostgreSQL driver. These types support the binary format for enhanced performance with pgx.
They also support the database/sql Scan
and Value
interfaces and can be used with https://github.com/lib/pq.
Languages
Go
98.6%
HTML
1.2%
Shell
0.2%