From: | Brendan Jurd <direvus(at)gmail(dot)com> |
---|---|
To: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) |
Date: | 2013-03-27 17:14:32 |
Message-ID: | CADxJZo2RO_8tv5C4t6xU-K8VMcroEgJXAeoucm5tbJoza1Qr=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 28 March 2013 00:21, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> The patch is also allowing '{{},{},{}}' which is described up-thread
> as a 2-D empty array. That's pretty misleading, since it has length 3
> (in the first dimension). '{{},{}}' and '{{}}' are both "more empty",
> but neither is completely empty.
> I'm not saying that the current situation is not broken. I'm just
> questioning whether the fix is actually any less confusing than what
> we have now.
Well the fix is primarily about 1-D empty arrays, and in that respect
it is much less confusing than what we have now. As for multidim
arrays, I don't use them in the field, so I don't have a strong
opinion about how (or even whether) we should support empty multidim.
I included the '{{}}' syntax following comments from Tom that we
should consider supporting that if we were to get rid of zero-D, but I
don't really have any skin in that game.
Since we require multidim arrays to be regular, perhaps they would
need extents in all dimensions to be practically useful ... if you
wanted to define a blank tic-tac-toe board using a 2-D array, for
example, you'd probably define it as 3x3 with NULL values in each
position, rather than trying to make it "empty".
Cheers,
BJ
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-03-27 17:23:03 | Re: [COMMITTERS] pgsql: Allow external recovery_config_directory |
Previous Message | Tom Lane | 2013-03-27 16:43:05 | Re: money with 4 digits after dot |