Re: dropping datumSort field

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: dropping datumSort field
Date: 2022-08-09 15:23:27
Message-ID: CALNJ-vT0mL912vEWm5G_n_UdnZgEOCQVSHfASSoFky7xegEc+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 9, 2022 at 8:01 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Mon, Aug 8, 2022 at 5:51 PM Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
> > Hi,
> > I was looking at ExecSort() w.r.t. datum sort.
> >
> > I wonder if the datumSort field can be dropped.
> > Here is a patch illustrating the potential simplification.
> >
> > Please take a look.
>
> One problem with this patch is that, if I apply it, PostgreSQL does not
> compile:
>
> nodeSort.c:197:6: error: use of undeclared identifier 'tupDesc'
> if (tupDesc->natts == 1)
> ^
> 1 error generated.
>
> Leaving that aside, I don't really see any advantage in this sort of
> change.
>
> --
> Robert Haas
> EDB: http://www.enterprisedb.com

Thanks for trying out the patch.

TupleDesc tupDesc;

tupDesc is declared inside `if (!node->sort_Done)` block whereas the last
reference to tupDesc is outside the if block.

I take your review comment and will go back to do more homework.

Cheers

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-08-09 15:24:22 Re: dropping datumSort field
Previous Message Robert Haas 2022-08-09 15:21:19 Re: making relfilenodes 56 bits