On 08/07/2023 22:49, Tom Lane wrote:
BTW, what's your opinion of allowing "[1:0]={}" ? Although that was
my proposal to begin with, I'm having second thoughts about it now.
The main reason is that the input transformation would be lossy,
eg "[1:0]={}" and "[101:100]={}" would give the same results, which
seems a little ugly.
Hmm, yeah, that would feel wrong if you did something like this:
select ('[2:1]={}'::text[]) || '{x}'::text[];
and expected it to return '[2:2]={x}'.
I guess we could allow "[1:0]={}" as a special case, but not
"[101:100]={}", but that would be weird too.
Given the lack of field complaints, maybe we should leave that
alone.
+1 to leave it alone. It's a little weird either way, so better to stay
put. We can revisit it later if we want to, but I wouldn't want to go
back and forth on it.
--
Heikki Linnakangas
Neon (https://neon.tech)