CSN wrote:
> This avoids the NULL problem - is there a better way?
>
> aCats varchar[] = array[''''];
aCats varchar[] = ''{}'';
This gives you a truly empty array that can later become single or
multidimensional.
e.g.
regression=# select '{}'::int[] || 1;
?column?
----------
{1}
(1 row)
regression=# select '{}'::int[] || array[1,2];
?column?
----------
{1,2}
(1 row)
regression=# select '{}'::int[] || array[[1,2],[3,4]];
?column?
---------------
{{1,2},{3,4}}
(1 row)
HTH,
Joe