Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields - Mailing list pgsql-hackers

From Joe Conway
Subject Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields
Date
Msg-id 411451F5.6060200@joeconway.com
Whole thread Raw
In response to Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields strange  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields  (James William Pye <flaw@rhid.com>)
List pgsql-hackers
Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>>select '{{},{}}'::text[];
>>ERROR:  malformed array literal: "{{},{}}"
> 
> Hm.   This seems like it would be a legitimate representation of a 2x0
> array.  Why would you allow '{}' and reject this?

I just reread your comment and thought about it more. I think most of 
what I said in the last post holds, but in addition part of the problem 
lies in the fact that we don't implement multidimensional arrays as 
nested arrays, but rather as one monolithic structure. If we did the 
former, then 2x0 would be feasible.

Investigating, and possibly implementing, multidimensional arrays as a 
nested structure is another item on my wish list. I'm still not entirely 
sure how difficult or desirable it is, but my interpretation of SQL99 is 
that nested arrays is the requirement.

Joe


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields strange
Next
From: Joe Conway
Date:
Subject: Re: [PATCHES] [BUGS] casting strings to multidimensional arrays yields