Re: "could not find pathkey item to sort" for TPC-DS queries 94-96

From: ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker )
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: James Coleman <jtc331(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Luc Vlaming <luc(at)swarm64(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: "could not find pathkey item to sort" for TPC-DS queries 94-96
Date: 2021-04-20 11:11:31
Message-ID: 87im4hnrbw.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker) writes:

> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
>> + /* We ignore binary-compatible relabeling on both ends */
>> + while (expr && IsA(expr, RelabelType))
>> + expr = ((RelabelType *) expr)->arg;
>
> There are 10 instances of this exact loop scattered around the codebase.
> Is it worth it turning it into a static inline function?

Something like the attached, maybe?

- ilmari
--
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen

Attachment Content-Type Size
0001-Create-a-function-for-stripping-RelabelType-nodes-of.patch text/x-diff 6.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2021-04-20 11:29:43 RE: Table refer leak in logical replication
Previous Message Dave Page 2021-04-20 10:41:42 Re: PATCH: Add GSSAPI ccache_name option to libpq