You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some datatypes in Postgres are inductive types. Notably, rows/composite types are: a composite types is made up of a selection of fields of other types, including, potentially, a composite type! However, arrays are not an inductive datatype in Postgres. There is no representation for "array of array of T" that is sensical: there are only arrays of higher dimensionality. And an array must form a matrix, see #1762 for more on that.
...however, you can make an array that is made of composite types, and you can make a composite type that has an array as a field, making the fact it isn't implemented as a potentially-inductive datatype... rather pointless?
Whatever, I don't really care.
...Except I do care that I get reports of people trying to return Vec<Vec<T>>, but that doesn't have a coherent repr in Postgres, so they get something they didn't expect. If we made it so this didn't work unless it was something an array considered a valid type, this would fail.
The text was updated successfully, but these errors were encountered:
Some datatypes in Postgres are inductive types. Notably, rows/composite types are: a composite types is made up of a selection of fields of other types, including, potentially, a composite type! However, arrays are not an inductive datatype in Postgres. There is no representation for "array of array of T" that is sensical: there are only arrays of higher dimensionality. And an array must form a matrix, see #1762 for more on that.
...however, you can make an array that is made of composite types, and you can make a composite type that has an array as a field, making the fact it isn't implemented as a potentially-inductive datatype... rather pointless?
Whatever, I don't really care.
...Except I do care that I get reports of people trying to return
Vec<Vec<T>>
, but that doesn't have a coherent repr in Postgres, so they get something they didn't expect. If we made it so this didn't work unless it was something an array considered a valid type, this would fail.The text was updated successfully, but these errors were encountered: