Re: How to unnest nested arrays

2020-04-06 Thread Pavel Stehule
út 7. 4. 2020 v 7:25 odesílatel Guyren Howe napsal: > > > On Apr 6, 2020, at 19:44 , David G. Johnston > wrote: > > On Mon, Apr 6, 2020 at 6:12 PM Guyren Howe wrote: > >> Consider this: >> >> *select* (*array*[*array*[1, 2], *array*[3, 4]])[i:i] >> *from* *generate_subscripts*(*array*[*array*[1

Re: How to unnest nested arrays

2020-04-06 Thread Guyren Howe
> On Apr 6, 2020, at 19:44 , David G. Johnston > wrote: > > On Mon, Apr 6, 2020 at 6:12 PM Guyren Howe > wrote: > Consider this: > > select (array[array[1, 2], array[3, 4]])[i:i] > from generate_subscripts(array[array[1, 2], array[3, 4]], 1) i > > which produces: >

Re: How to unnest nested arrays

2020-04-06 Thread Pavel Stehule
út 7. 4. 2020 v 4:44 odesílatel David G. Johnston < david.g.johns...@gmail.com> napsal: > On Mon, Apr 6, 2020 at 6:12 PM Guyren Howe wrote: > >> Consider this: >> >> *select* (*array*[*array*[1, 2], *array*[3, 4]])[i:i] >> *from* *generate_subscripts*(*array*[*array*[1, 2], *array*[3, 4]], 1) i >

Re: How to unnest nested arrays

2020-04-06 Thread David G. Johnston
On Mon, Apr 6, 2020 at 6:12 PM Guyren Howe wrote: > Consider this: > > *select* (*array*[*array*[1, 2], *array*[3, 4]])[i:i] > *from* *generate_subscripts*(*array*[*array*[1, 2], *array*[3, 4]], 1) i > > which produces: > > {{1,2}} > {{3,4}} > > I expect and want, from that source: > > {1, 2} > {

How to unnest nested arrays

2020-04-06 Thread Guyren Howe
Consider this: select (array[array[1, 2], array[3, 4]])[i:i] from generate_subscripts(array[array[1, 2], array[3, 4]], 1) i which produces: {{1,2}} {{3,4}} I expect and want, from that source: {1, 2} {3, 4} These don’t work: select (array[array[1, 2], array[3, 4]])[i:i][:] {{1,2}} {{3,4}} s