Re: [PATCH] Incremental sort (was: PoC: Partial sort)

From: James Coleman <jtc331(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Shaun Thomas <shaun(dot)thomas(at)2ndquadrant(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Date: 2020-03-23 02:05:50
Message-ID: CAAaqYe-2xD38pD2BXQ95nQh98d5HmOT_mEVdhf-0f+aRcXdo8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 22, 2020 at 8:54 PM Andreas Karlsson <andreas(at)proxel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-03-23 02:06:45 Re: Improve errors when setting incorrect bounds for SSL protocols
Previous Message Corey Huinker 2020-03-23 01:00:41 Re: optimisation? collation "C" sorting for GroupAggregate for all deterministic collations