Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppuhR-0001r2-7m for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Apr 2023 17:37:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ppuhQ-0003AM-1i for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Apr 2023 17:37:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppuhP-0003AD-LV for pgsql-hackers@lists.postgresql.org; Fri, 21 Apr 2023 17:37:31 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ppuhM-0017K1-QJ for pgsql-hackers@lists.postgresql.org; Fri, 21 Apr 2023 17:37:30 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-5ef54bcded4so10750466d6.1 for ; Fri, 21 Apr 2023 10:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20221208.gappssmtp.com; s=20221208; t=1682098648; x=1684690648; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ncULU9YqJPb2drw8KhfQdBNhGsvE1+6/TK2SOJFfYh0=; b=gnXdm/xjjzrDKadsJsesObiy6zeLXyIREs/qGNYULHi9ijwkMOyv64WoXChazEFbKi 4YxChZ3xOBjMdGApedaLS/EyL9Dg4EvOXkCSiyiMp7/sHtI06cXrhWuuyF8Ef7hzA9fv GKxdbep4m8FC2ry6/v/Br6KMgrWB3xSiGwd7LqdciJUihTu7nPsmCo3q2IVaa27XswdO 5i00sEcB9bTpsoYMJjv7J5FPAaXKH8RNQyYnV0frsiDzeJ4WSAlHFhdx4uCt4J3Tt3iF vMan0r+645GUfyIE5/BZB9v9GxZXT7Z4IsxQ3Rct0NZRRgATNq8fDmx16V8SqukWH2CL arug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682098648; x=1684690648; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ncULU9YqJPb2drw8KhfQdBNhGsvE1+6/TK2SOJFfYh0=; b=kSOTfJqZpkiDCULwctWMVnI+vOAZmZryTdxEx8Gs8QyFVCtcSPV87S/btIH5iiA+ZF WDTc02phaoznOTRTZl5X1NQvbi6cZ0Sc+lN58c1W32nXDbWMYDhjEEcXfY+R0eUbbReo I3ub9Zb3HHZm24eDoLqKs8EBv2AMNiBYeuounos94dBWIPOXXAAKv+rjgypLgGeO1ahb toa8VHqvwHyhjJZKz7K+2+JdxxL3ZU0ZM4ekewNruMlf1LtELIQggwgqcpaxOLY1ntga hCN117tarvqZ67GU/VkeJ7UZY85CDmpEI2y1sv8SA3I+JMs81/xULs7fDzlPLiGA+Wv1 htQA== X-Gm-Message-State: AAQBX9eJM25yW8B38y1FF4mG1u2usqV620NQ2WgFJ8biBT6D56eRBChO 6curI2IoH1ZDl0dIv1gmcsafpA== X-Google-Smtp-Source: AKy350bY23rRCPGg9GmLG4r+Z7WFvisty6W7j8w6oEx7aHdFfgwxa0w8e3GrX1thUZtq3p+az7JuSg== X-Received: by 2002:a05:6214:5282:b0:56e:bfda:a14f with SMTP id kj2-20020a056214528200b0056ebfdaa14fmr8628293qvb.9.1682098647842; Fri, 21 Apr 2023 10:37:27 -0700 (PDT) Received: from F ([208.127.183.82]) by smtp.gmail.com with ESMTPSA id o11-20020ad443cb000000b005fafacceea6sm1204028qvs.2.2023.04.21.10.37.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Apr 2023 10:37:27 -0700 (PDT) From: "Regina Obe" To: "'Tom Lane'" , "'Peter Eisentraut'" Cc: "'Sandro Santilli'" , , "'Jeff Davis'" References: <000b01d97465$c34bbd60$49e33820$@pcorp.us> <3353947.1682092131@sss.pgh.pa.us> <533d93c5-f604-8e5f-4a48-975c08c53d59@enterprisedb.com> <3365333.1682098091@sss.pgh.pa.us> In-Reply-To: <3365333.1682098091@sss.pgh.pa.us> Subject: RE: Order changes in PG16 since ICU introduction Date: Fri, 21 Apr 2023 13:37:25 -0400 Message-ID: <002d01d97477$f0395640$d0ac02c0$@pcorp.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGxk+8S/MfoZUDGLFz42A+I7+xfAAHR8HzHAhsEYz4Bynr6awHasdxCr0k1y5A= Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Peter Eisentraut writes: > > If the database is created with locale provider ICU, then lc_collate > > does not apply here, so the result might be correct (depending on what > > locale you have set). > > FWIW, an installation created under LANG=C defaults to ICU locale en-US-u- > va-posix for me (see psql \l), and that still sorts as expected on my RHEL8 box. > We've not seen buildfarm problems either. > > I am wondering however whether this doesn't mean that all our carefully > coded fast paths for C locale just went down the drain. Does the ICU code > have any of that? Has any performance testing been done to see what impact > this change had on C-locale installations? (The current code coverage report > for pg_locale.c is not encouraging.) > > regards, tom lane Just another metric. On my mingw64 setup, I built a test database on PG16 (built with icu support) and PG15 (no icu support) CREATE DATABASE test TEMPLATE=template0 ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C'; I think the above is the similar setup we have when testing. On PG15 SELECT '+' < '-' ; returns true On PG 16 returns false For PG 16, to strk's point, you have to do: to get a true SELECT '+' COLLATE "C" < '-' COLLATE "C"; I would expect since I'm initializing my db in collate C they would both behave the same