Re: Multidimensional array definition in composite type appears parsed as string
От | Tom Lane |
---|---|
Тема | Re: Multidimensional array definition in composite type appears parsed as string |
Дата | |
Msg-id | 8334.1243521906@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Multidimensional array definition in composite type appears parsed as string (miller_2555 <nabble.30.miller_2555@spamgourmet.com>) |
Ответы |
Re: Multidimensional array definition in composite type
appears parsed as string -- SOLVED
|
Список | pgsql-general |
miller_2555 <nabble.30.miller_2555@spamgourmet.com> writes: > I appreciate the clarification on the output. Given the assignment appears > correct, what is the appropriate method to access the elements of the > multidimensional array? I think what you're missing is the distinction between slice and simple element access, ie instead of this (myvar[i]).multidimarray[j] you'd need something like this (myvar[i]).multidimarray[j][1:3] The proposed loop coding is uselessly overcomplicated because it supposes that 2-D arrays could be nonrectangular. Just use array_lower and array_upper on dimension 2 of the 2-D array in the innermost loop. You might want to practice a bit with a plain 2-D array field before getting into the complexity of embedding it in a composite embedded in an array ... regards, tom lane
В списке pgsql-general по дате отправления: