[GENERAL] Multidimensional array definition in composite type appears parsed as string

2009-05-27 Thread miller_2555
Hi - I am trying to declare an array of the following compound type: CREATE TYPE myschema.mytype AS ( sometexttext, onedimarray text[], multidimarray text[][] ); The current assignment occurs as follows: myvar mysch

Re: [GENERAL] Multidimensional array definition in composite type appears parsed as string

2009-05-27 Thread Tom Lane
miller_2555 writes: > I am trying to declare an array of the following compound type: > CREATE TYPE myschema.mytype AS ( > sometexttext, > onedimarray text[], > multidimarray text[][] > ); > The current assignment occurs as follows:

Re: [GENERAL] Multidimensional array definition in composite type appears parsed as string

2009-05-28 Thread miller_2555
Tom Lane-2 wrote: > > It sounds like you are using some code that mistakenly thinks that > double quotes have a semantic meaning here. They do not. They are just > there to delimit members of the row value, not to tell you what type the > members are. > Note: quoted text abridged per mailing

Re: [GENERAL] Multidimensional array definition in composite type appears parsed as string

2009-05-28 Thread Tom Lane
miller_2555 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

Re: [GENERAL] Multidimensional array definition in composite type appears parsed as string -- SOLVED

2009-05-28 Thread miller_2555
Tom Lane-2 wrote: > > miller_2555 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 si

Re: [GENERAL] Multidimensional array definition in composite type appears parsed as string -- SOLVED

2009-05-28 Thread Tom Lane
miller_2555 writes: > I had assumed that the whole slice of a sub-array would have been returned > as a 1-D array by accessing an element of the "outer" array, but that does > not appear the case. No, it's not. The semantics are constrained here by the fact that we don't consider 1-D and 2-D ar