On Sat, Mar 7, 2020 at 4:06 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > It's possible that this is a bad idea. It bears a lot of similarity, > I guess, to the way that Postgres doesn't consider arrays of different > dimensionality to be distinct types. That has some advantages but it > surely also has downsides. I think on the whole the advantages win, > and I feel like that might also be the case here.
Personally, I'm pretty unhappy with the fact that the array system conflates arrays with different numbers of dimensions. Like, you end up having to write array_upper(X, 1) instead of just array_upper(X), and then you're still left wondering whether whatever you wrote is going to blow up if somebody sneaks a multidimensional array in there, or for that matter, an array with a non-standard lower bound. There's lots of little things like that, where the decision to decorate the array type with these extra frammishes makes it harder to use for everybody even though most people don't use (or even want) those features. So count me as +1 for keeping range and multirange separate. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company