Re: pgsql: Convert 'x IN (VALUES ...)' to 'x = ANY ...' then appropriate

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Alexander Korotkov <akorotkov(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Convert 'x IN (VALUES ...)' to 'x = ANY ...' then appropriate
Date: 2025-04-07 13:08:49
Message-ID: CAPpHfdtNKv-87KVBHnQ7kXavkp9bDOFTiHtkqQn3SzxOPmP_+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi, David!

On Mon, Apr 7, 2025 at 12:15 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Mon, 7 Apr 2025 at 19:39, Melanie Plageman <melanieplageman(at)gmail(dot)com> wrote:
> > +++ C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/results/subselect.out
> > 2025-04-04 14:47:20.358393500 +0000
> > @@ -2769,15 +2769,16 @@
> > EXPLAIN (COSTS OFF)
> > SELECT c.oid,c.relname FROM pg_class c JOIN pg_am a USING (oid)
> > WHERE c.oid IN (VALUES (1), (2));
> > - QUERY PLAN
> > ----------------------------------------------------------------
> > - Hash Join
> > - Hash Cond: (a.oid = c.oid)
> > - -> Seq Scan on pg_am a
> > - -> Hash
> > - -> Index Scan using pg_class_oid_index on pg_class c
> > - Index Cond: (oid = ANY ('{1,2}'::oid[]))
> > -(6 rows)
> > + QUERY PLAN
> > +---------------------------------------------------------
> > + Merge Join
> > + Merge Cond: (c.oid = a.oid)
> > + -> Index Scan using pg_class_oid_index on pg_class c
> > + Index Cond: (oid = ANY ('{1,2}'::oid[]))
> > + -> Sort
> > + Sort Key: a.oid
> > + -> Seq Scan on pg_am a
> > +(7 rows)
>
> Are these failures from patches applied to master prior to 3ba2cdaa?

Yes, these failures appears before 3ba2cdaa. Tom committed 3ba2cdaa
to fix the problem before I get into it [1].

Links.
1. https://www.postgresql.org/message-id/srnuqlttuimzmvoulhsrbgvj4vnul6b65osswvua7sfkqsvmuy%40yg7apybpxp34

------
Regards,
Alexander Korotkov
Supabase

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2025-04-07 13:29:15 pgsql: Remove GUC_NOT_IN_SAMPLE from enable_self_join_elimination
Previous Message Daniel Gustafsson 2025-04-07 12:35:35 pgsql: psql: Clarify help message for WATCH_INTERVAL

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2025-04-07 13:10:12 Re: Unquoted file name in an error message
Previous Message Nazir Bilal Yavuz 2025-04-07 13:03:48 Re: ci: Allow running mingw tests by default via environment variable