Re: Redundant Result node

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Redundant Result node
Date: 2024-08-27 11:26:15
Message-ID: CAEudQAqrO-qyMuOHJcPp4L4wLJtOuOSEduHVkfLexMTc+AC05g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em ter., 27 de ago. de 2024 às 00:43, Richard Guo <guofenglinux(at)gmail(dot)com>
escreveu:

> On Thu, Aug 22, 2024 at 9:02 PM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> > Em qui., 22 de ago. de 2024 às 04:34, Richard Guo <
> guofenglinux(at)gmail(dot)com> escreveu:
> >> This does not seem right to me, as PathTargets are not canonical, so
> >> we cannot guarantee that two identical PathTargets will have the same
> >> pointer. Actually, for the query above, the two PathTargets are
> >> identical but have different pointers.
> >
> > Could memcmp solve this?
>
> Hmm, I don't think memcmp works for nodes that contain pointers.
>
The first case which memcmp can fail is if both pointers are null.
But considering the current behavior, the cost vs benefit favors memcmp.

best regards,
Ranier Vilela

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2024-08-27 11:57:24 Re: [PATCH] Add CANONICAL option to xmlserialize
Previous Message Tomas Vondra 2024-08-27 11:16:25 Re: Parallel CREATE INDEX for GIN indexes