From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jelte Fennema-Nio <me@jeltef.nl>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Combining array slicing and indexing causes incorrect/confusing results
Date: Tue, 21 Jan 2025 12:04:56 -0500
Message-ID: <3356242.1737479096@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGECzQR+CUuHDYOooGO5y87nRJnw_sjOvPVBUt7pmg2vopgc7w@mail.gmail.com>
References: <CAGECzQR+CUuHDYOooGO5y87nRJnw_sjOvPVBUt7pmg2vopgc7w@mail.gmail.com>
Jelte Fennema-Nio <me@jeltef.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, me@jeltef.nl, pgsql-bugs@lists.postgresql.org
Subject: Re: Combining array slicing and indexing causes incorrect/confusing results
In-Reply-To: <3356242.1737479096@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox