Re: Cleaning up array_in()

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Cleaning up array_in()
Дата
Msg-id 01a01e88-de7b-d4b9-175a-a8699729243c@iki.fi
обсуждение исходный текст
Ответ на Re: Cleaning up array_in()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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)




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Cleaning up array_in()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DecodeInterval fixes