Re: Use of additional index columns in rows filtering

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, James Coleman <jtc331(at)gmail(dot)com>, Maxim Ivanov <hi(at)yamlcoder(dot)me>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Konstantin Knizhnik <knizhnik(at)garret(dot)ru>
Subject: Re: Use of additional index columns in rows filtering
Date: 2023-07-24 17:58:45
Message-ID: 1590274.1690221525@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> On Mon, Jul 24, 2023 at 10:36 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>> Could we start out conservatively and push down as an Index Filter
>> unless there is some other clause ahead of it that can't be pushed
>> down? That would allow users to have some control by writing clauses in
>> the desired order or wrapping them in functions with a declared cost.

> I'm a bit concerned about cases like the one I described from the
> regression tests.

Please do not put in any code that assumes that restriction clause
order is preserved, or encourages users to think it is. There are
already cases where that's not so, eg equivalence clauses tend to
get shuffled around.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2023-07-24 18:04:37 Re: odd buildfarm failure - "pg_ctl: control file appears to be corrupt"
Previous Message Peter Geoghegan 2023-07-24 17:54:31 Re: Use of additional index columns in rows filtering