Hi Hackers,

While working on general array sort[1], I played with intarray
extension, found a bug (or at least inconsistency) when sorting
multidimensional int array:

create extension intarray;
select sort('{{1,2,3}, {2,3,4}}');

this returns {{1,2,2},{3,3,4}} instead of {{1,2,3},{2,3,4}}

I think this is misleading, if int array is only for one dimension
array, we should
error out when sorting multidimensional int array. Or we can do something like
attached POC patch to make it work with multidimensional int array.

Thoughts?

[1]: 
https://www.postgresql.org/message-id/CAEG8a3KD7ZmQpxNhfPxyc0BjTTTUXiqb56VuMgB7Muu0%2ByV%3DqQ%40mail.gmail.com

-- 
Regards
Junwang Zhao

Attachment: v1-0001-int-array-support-multi-dim.patch
Description: Binary data

Reply via email to