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
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:
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
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
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
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