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.89) (envelope-from ) id 1h5xYL-0008Hq-5I for pgsql-committers@arkaria.postgresql.org; Mon, 18 Mar 2019 19:04:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5xYI-0007ts-Ql for pgsql-committers@arkaria.postgresql.org; Mon, 18 Mar 2019 19:04:02 +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 1h5xYH-0007tl-2K for pgsql-committers@lists.postgresql.org; Mon, 18 Mar 2019 19:04:02 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5xYC-0004sA-Eh for pgsql-committers@lists.postgresql.org; Mon, 18 Mar 2019 19:04:00 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id DE6B4459F; Mon, 18 Mar 2019 15:03:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 18 Mar 2019 15:03:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=w6BY8/0gdEAqcngy3grrB6u/+o1 hI8FQoKlCK+nyNQA=; b=Dx3EsgE5GAcOoXmGzcjyzbDZXKS3IKScgVV9vi3+ibZ aCxNLJX/qThtLLLCvOPbl6qmMfxQLMebJFzzlU68X2u3wP7mLxY33Zg/5X4lx1Qj Ac+4Xno1k4vgM2teuNGAJAmqxbn/7fmXjt0nnCmp5DIpB01uT6A8aNb8cf5vm2u9 ijJTYMqo7Hy1ErdHKEYuRNw0TI4UehlJRppGoMi2/rKjM2YgVKzzWru8Uq5uRoD1 zn3Ara+LhpbkHJ9DWR/+aG/nk1X++QybMYfQEmTj9jnxuX/ZOhlN9+OhiOgi5wgs SpC0ZFidbgMXjA6OVvV6VrXDZFRfmE9PrJ2KHZcUTXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=w6BY8/ 0gdEAqcngy3grrB6u/+o1hI8FQoKlCK+nyNQA=; b=cE9mXbrGyhwcP4GY7uagNC 981ot/lmK79Qzf/Q/zvDOnTfrW3hF20WVkvZVQooLQHH4mi+7u6J0T47aLOueM8y i2U2CZ7qbCA8OyHZ7iua7T4Vw+yYyhBY7AwJvT+7/sfHZOOMUCNsqV0WFk8aJeMi xDkKA6z3I8FdfvyAPuBKKIB0rPefj1duf3CCklA3k8pyU0XSNvhU8g6gT7L/8wZP 2xCsunOwahUkWIhGNzaFv04HTyjRixQ33zCd1TC+Vb2Er6XyRyl/TxLhfdjCyC/J SEJSw0+XSfT4hywwakO6pzMaDiDj2+oE6L0yK5OuKWm+24yWDCbf8LynmaSN4//Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddriedugdduvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucffohhmrg hinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeelkedrvddutddrudegtddrudej udenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdrug gvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id EFDB5E4210; Mon, 18 Mar 2019 15:03:52 -0400 (EDT) Date: Mon, 18 Mar 2019 12:03:51 -0700 From: Andres Freund To: Peter Eisentraut Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add support for collation attributes on older ICU versions Message-ID: <20190318190351.bkgkrgr6frnv3cxr@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-03-17 07:47:45 +0000, Peter Eisentraut wrote: > Add support for collation attributes on older ICU versions > > Starting in ICU 54, collation customization attributes can be > specified in the locale string, for example > "@colStrength=primary;colCaseLevel=yes". Add support for this for > older ICU versions as well, by adding some minimal parsing of the > attributes in the locale string and calling ucol_setAttribute() on > them. This is essentially what never ICU versions do internally in > ucol_open(). This was we can offer this functionality in a consistent > way in all ICU versions supported by PostgreSQL. > > Also add some tests for ICU collation customization. > > Reported-by: Daniel Verite > Discussion: https://www.postgresql.org/message-id/0270ebd4-f67c-8774-1a5a-91adfb9bb41f@2ndquadrant.com I now get this warning: /home/andres/src/postgresql/src/backend/utils/adt/pg_locale.c:1680:14: warning: comparison of constant -1 with expression of type 'UColAttribute' is always true [-Wtautological-constant-out-of-range-compare] if (uattr != -1 && uvalue != -1) ~~~~~ ^ ~~ Greetings, Andres Freund