Re: Combining array slicing and indexing causes incorrect/confusing results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Combining array slicing and indexing causes incorrect/confusing results
Date: 2025-01-21 17:04:56
Message-ID: 3356242.1737479096@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jelte Fennema-Nio <me(at)jeltef(dot)nl> writes:
> Due to the way SubscriptingRef works there's no way for it to describe
> a subscript sequence that both does a slice and a regular index in the
> same SubscriptingRef.

Well, yeah, because they're fundamentally different operations.
A slice produces a value of the array type, a regular index
operation produces a value of the element type. So if you
mix the notations we assume you really meant slicing in each
subscript.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Даниил Элишаков 2025-01-22 08:28:53 Re: BUG #18779: Segmentation fault while trying to connect via psql
Previous Message Jelte Fennema-Nio 2025-01-21 16:35:17 Combining array slicing and indexing causes incorrect/confusing results