Re: [PATCH] Incremental sort (was: PoC: Partial sort) - Mailing list pgsql-hackers

From James Coleman
Subject Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Date
Msg-id CAAaqYe-2xD38pD2BXQ95nQh98d5HmOT_mEVdhf-0f+aRcXdo8A@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Incremental sort (was: PoC: Partial sort)  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: [PATCH] Incremental sort (was: PoC: Partial sort)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Sun, Mar 22, 2020 at 8:54 PM Andreas Karlsson <andreas@proxel.se> wrote:
>
> On 3/23/20 1:33 AM, James Coleman wrote:
> > So on the face of it we have a bit of a no-win situation. The function
> > tuple_sort_method_name returns a const, but lappend wants a non-const.
> > I'm not sure what the project style preference is here: we could cast
> > the result as (char *) to drop the const qualifier, but that's frowned
> > upon some places. Alternatively we could make a new non-const copy of
> > string. Which is preferable in the postgres project style?
>
> The PostgreSQL has places where const is explicitly casted away with the
> unconstify() macro, so unless you can find a better solution that is
> probably an ok option.

Thanks, that's exactly what I need!

James



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: optimisation? collation "C" sorting for GroupAggregate for alldeterministic collations
Next
From: Michael Paquier
Date:
Subject: Re: Improve errors when setting incorrect bounds for SSL protocols