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 1hQsu4-0000zx-Jo for pgsql-bugs@arkaria.postgresql.org; Wed, 15 May 2019 12:21:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQsu3-00064Y-0l for pgsql-bugs@arkaria.postgresql.org; Wed, 15 May 2019 12:20:59 +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 1hQsu2-00064R-LW for pgsql-bugs@lists.postgresql.org; Wed, 15 May 2019 12:20:58 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQstz-0003Tx-H9 for pgsql-bugs@lists.postgresql.org; Wed, 15 May 2019 12:20:58 +0000 Received: by mail-qt1-x844.google.com with SMTP id i26so1069996qtr.10 for ; Wed, 15 May 2019 05:20:55 -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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=4R7MNtHhuaYZUNH9/3UB8qzhY+fhG/BejVHPjB4uOqI=; b=wsJ91ZKDFLFgddyckaTsgIbhUJhEEvFS5Bu46nSxFCQjo4GpwjkRt55yYj9Aw9/jxP LwlY7kKON8D9/9HxtczgyM7ITkdkTXNcaaHaAz1gAk48arPrWNqa+LYC3XOvl63tmlAU a2QE0WrKVLOK1qhbsuLDKKVWaHzp2Yx1GBLerR6xsFttGxZ9FThvGYM/MqaQ04OY4W8D v6RGluvoCJhIPicVCy/NPV6dHDQFiCuXIDLUy3e0vyGUQSvMgVqTa75MX2kXMfPV3cOY 1J6RSqNbxTbb0rEKP4WDM5jGMy4wQE8625eh1xxRYf6w88JleBqmaY8XVRnYsqdCve98 JV0Q== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4R7MNtHhuaYZUNH9/3UB8qzhY+fhG/BejVHPjB4uOqI=; b=UNcAltjo+Ej76nKJbQy4eE5Jyr4pzhk01aF2GgmEG8n3by8s+XUpK2Cdlm6sII5uNP J0QJBSM9Wnh+/n3ivBVuPdTtgRGFPSw3JpPALMa24Jgg5ZiAcju7jzYQOKWgdjhSBp7E z3mW0zsXmBzwmKyFKm0OVnAVVUT6pgH3+enbj5wBR2RcAC0AlyLUfwgUy5IGHyxrzoZc D/UbWJ2wyJpEDUEf/xVgiW26UJ/Mg+6U31RHzarbfndghCcXc9qOP7oFqBUZKzFK0G+3 jKrJvU8SRCMXPZ0kudK+z+t/A/u7WhF8mRRv6RaVZGJrmMpjgpvWY8vMm0hz1idOsLMg 2aYA== X-Gm-Message-State: APjAAAXphWg5J5yBMUkrjTjuAnD55dJjoqB7kt89O7gz2yCDWeUNaimN gmbPvrTPUzyMoIBABDo/N/53FA== X-Google-Smtp-Source: APXvYqyKeVC0yAu1497BhxBs7kmnFAfFAxl3tCotXs0N8NO7OI1xBYE3T9jpBeaQUaPa7j8l0mPgnA== X-Received: by 2002:ac8:1aa9:: with SMTP id x38mr35367572qtj.172.1557922853653; Wed, 15 May 2019 05:20:53 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.48.227]) by smtp.gmail.com with ESMTPSA id b11sm971624qtt.6.2019.05.15.05.20.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2019 05:20:52 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 4CC3C1208DB; Wed, 15 May 2019 08:20:48 -0400 (-04) Date: Wed, 15 May 2019 08:20:48 -0400 From: Alvaro Herrera To: Daniel Gustafsson Cc: iksss.88@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #15805: Problem with =?utf-8?Q?low?= =?utf-8?Q?er_function_for_greek_sigma_=28=CE=A3=29?= letter Message-ID: <20190515122048.GA12876@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-May-15, Daniel Gustafsson wrote: > > I see unexpected behaviour of lower function for greek sigma letter Σ. > > According to wikipedia (https://en.wikipedia.org/wiki/Sigma) if this letter > > is in final word position, it should be ς in lowercase, and not σ. But > > PotgreSQL lower function returns σ, for example lower('ΔΗΜΟΤΕΣ ΦΑΙΣΤΟΥ') = > > "δημοτεσ φαιστου" instead of "δημοτες φαιστου". So if I try to pass this > > lower string from another part of a system (java code, for example) Postgre > > will not return this row cause it differs from java-generated one. > > This is indeed a bug, and a rare occurrence since AFAICT from ISO 30112 and > googling there is only a single case of word-final lowercasing which is this > sigma. The attached patch takes a stab at fixing this. Ummm ... isn't this a counterexample? https://hebrew4christians.com/Grammar/Unit_One/Final_Forms/final_forms.html -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services