Created
March 19, 2018 09:35
-
-
Save barsbek/5388fd1bc0e95f04463992e47f587620 to your computer and use it in GitHub Desktop.
postgresql: generate indexes of the given matrix (multidimensional array)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select generate_subscripts(array[array[1,2,3], array[4,5,6]], 2); -- 1,2,3 | |
select generate_subscripts(array[array[1,2,3], array[4,5,6]], 1); -- 1,2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment