Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jGCza-0003a4-Ke for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2020 02:39:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jGCzY-00077b-TM for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2020 02:39:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jGCzY-00077U-GM for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2020 02:39:04 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jGCzQ-000366-TB for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2020 02:39:03 +0000 Received: by mail-wm1-x342.google.com with SMTP id z18so4230410wmk.2 for ; Sun, 22 Mar 2020 19:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=eNUf4YQzkQZzSEqTpsywyEQliHZ7bi5GUWu24ydJShA=; b=k3Vo9kn/gcy5twARRoYujlwu539VgTWBqLequXAGkwczKed3xqjj9RMC+0G852jJN3 DwfqWh/CfiiPuGnp4h0HqFvMt8bVgZSLHzNiVxQEppbzq8hZ4GCrHIGpbaVsIv7rkEnc Vd3eMN9A3SPbyca+uHw8io4emZbY5GRB0WLsAigJqZG93AhLgLru82R0A8LqxfP7qemp ZDQNIl902nGLQOIGsrpi/65sGzrkQCJFAspTG0sCFa2PhFoJEzV67nW4mHuFnW6prO7U swqqL5n+izfYb8MjWNCx95XEnjVRiaLEhXeVUckiWitr70aRFLpbNye5jeZBrexAFg6I N+qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eNUf4YQzkQZzSEqTpsywyEQliHZ7bi5GUWu24ydJShA=; b=GFk0bHlAGFMMssGRxHCpvVBabWWzG+kg/R03TsFbhypZTEymWuVCkLf3ULamkCdgXe BADDU17cO19lBGpmJ/YdR7hCafi7Ua0hOd9jaQCFViHKlvefE0P949Cku6Re9Ydx31AX tFceh/MrkkRiPSnSsueHB3R6dlNqLFiao9BjH/jevEHFJvJhngp/ml+vEavUzQgvAdNB FFFVbzP30aWuO7ksnAOlK/D0EfizmPM6WRTOzkI39tXv6cTOMwgoDhYe/R+RVJyjUIOW UKJ22XXZJ3MYT0OfvU1FgZqrk8tfN+KxPORGWNhAaFNfk3sR+kxcRlsxM2M6meCVsQX2 CMbg== X-Gm-Message-State: ANhLgQ1YDdOwjgPxw2BQ4wW4GM99jmPrHSLzaN9FfKDKtfYC/xhuUJlQ Z3xm5F4F0HYAo/UKCkU2VStzpg== X-Google-Smtp-Source: ADFU+vuNSljlusw/620iBiHsvKkBxG3GTmrBxgq++/PbrYHniG3MbgSRzac/+Lbi41QplORN7OmEOw== X-Received: by 2002:a1c:f717:: with SMTP id v23mr7659723wmh.1.1584931135179; Sun, 22 Mar 2020 19:38:55 -0700 (PDT) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id k3sm19573228wmf.16.2020.03.22.19.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Mar 2020 19:38:54 -0700 (PDT) Date: Mon, 23 Mar 2020 03:38:51 +0100 From: Tomas Vondra To: James Coleman Cc: Andreas Karlsson , Michael Paquier , Rafia Sabih , Peter Geoghegan , Simon Riggs , Shaun Thomas , Dmitry Dolgov <9erthalion6@gmail.com>, Alexander Korotkov , Tom Lane , PostgreSQL Developers , Alvaro Herrera Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort) Message-ID: <20200323023851.farartp34rlh7jwj@development> References: <20200314195822.bc2mqyvolo2w5l2w@development> <20200321005640.vrwcpyis6ahmspwt@development> <77129b5b-5266-2a89-a63e-da6691b60584@proxel.se> <70ed0ba6-2941-a372-b2e6-5ffa2bb77e0e@proxel.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Mar 22, 2020 at 10:05:50PM -0400, James Coleman wrote: >On Sun, Mar 22, 2020 at 8:54 PM Andreas Karlsson 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! > Yeah, sorry I forgot to mention/fix the warning in the last review round. BTW I think the comment for pathkeys_useful_for_ordering() needs updating, it still claims it's all-or-nothing affair, but that's no longer true I think. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services