Multi-dimensional arrays

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: 'PostgreSQL' <pgsql-general(at)postgresql(dot)org>
Subject: Multi-dimensional arrays
Date: 2014-03-15 12:51:41
Message-ID: 53244CDD.9070208@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

Here's an odd one (to me anyway) which I ran into today.... if I have a
multidimensional array, why does the following return NULL?

select (array[['abc','def'], ['ghi','jkl']])[1]

I would have expected it to return {abc, def}. This, however, returns
'abc' as expected:

select (array[['abc','def'], ['ghi','jkl']])[1][1]

Thanks,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yngve N. Pettersen 2014-03-15 13:53:19 Re: Possible multiprocess lock/unlock-loop problem in Postgresql 9.2
Previous Message Yngve N. Pettersen 2014-03-15 10:49:36 Re: Possible multiprocess lock/unlock-loop problem in Postgresql 9.2