multidimensional arrays

Started by Nonameabout 21 years ago2 messagesgeneral
Jump to latest
#1Noname
mstory@uchicago.edu

I'm writing a 2 dimensional array INTEGER[3][] that holds data that i need to
parse through to check for zeros. The user will insert into this array one row
at a time, when i insert the first row into this array it works fine but when i
check array_dims it gives me [1:3] not the [1:3][1:1] that i expected, also the
array lower and array upper for the second dimension i get a null value for
both, i checked the documentation and it says that multidimensional arrays act
strangly, but nothing i've read would give me the impression that something like
this should have happened. Any help would be appreciated.

matt

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: multidimensional arrays

mstory@uchicago.edu writes:

I'm writing a 2 dimensional array INTEGER[3][] that holds data that i
need to parse through to check for zeros. The user will insert into
this array one row at a time, when i insert the first row into this
array it works fine but when i check array_dims it gives me [1:3] not
the [1:3][1:1] that i expected,

You assigned a one-dimensional value to the array, not a two-dimensional
value.

regards, tom lane