The documentation says the following is allowed:

INSERT INTO sal_emp
    VALUES ('Bill',
    ARRAY[10000, 10000, 10000, 10000],
    ARRAY[['meeting', 'lunch'], ['','']]);

I cannot find justification for this in the standard.  According to my
reading, it should be

INSERT INTO sal_emp
    VALUES ('Bill',
    ARRAY[10000, 10000, 10000, 10000],
    ARRAY[ARRAY['meeting', 'lunch'], ARRAY['','']]);

-- 
Peter Eisentraut   peter_e@gmx.net


Fri, 27 Jun 2003 21:52:27 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Possible mistake in new array syntax
Peter Eisentraut wrote:
> The documentation says the following is allowed:
> 
> INSERT INTO sal_emp
>     VALUES ('Bill',
>     ARRAY[10000, 10000, 10000, 10000],
>     ARRAY[['meeting', 'lunch'], ['','']]);
> 
> I cannot find justification for this in the standard.  According to my
> reading, it should be
> 
> INSERT INTO sal_emp
>     VALUES ('Bill',
>     ARRAY[10000, 10000, 10000, 10000],
>     ARRAY[ARRAY['meeting', 'lunch'], ARRAY['','']]);
> 

This parallels my question on the last post. I don't see any 
justification for multidimensional arrays at all, so my thought was that 
we have a free hand to define it. It seemed much nicer to write:
     ARRAY[[[[[[1]]]]]]
for a 6 dimensional array, than this:
     ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[1]]]]]]
and actually, both do work:

regression=# select ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[ARRAY[1]]]]]];
      array
---------------
  {{{{{{1}}}}}}
(1 row)

regression=# select ARRAY[[[[[[1]]]]]];
      array
---------------
  {{{{{{1}}}}}}
(1 row)


Joe


Fri, 27 Jun 2003 15:09:35 -0700
Joe Conway <mail@joeconway.com>
Re: Possible mistake in new array syntax
Peter Eisentraut <peter_e@gmx.net> writes:
> The documentation says the following is allowed:
> INSERT INTO sal_emp
>     VALUES ('Bill',
>     ARRAY[10000, 10000, 10000, 10000],
>     ARRAY[['meeting', 'lunch'], ['','']]);

> I cannot find justification for this in the standard.  According to my
> reading, it should be

> INSERT INTO sal_emp
>     VALUES ('Bill',
>     ARRAY[10000, 10000, 10000, 10000],
>     ARRAY[ARRAY['meeting', 'lunch'], ARRAY['','']]);

If it's an extension, it seems like a pretty reasonable one ...

			regards, tom lane

Fri, 27 Jun 2003 20:18:35 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Possible mistake in new array syntax 