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 1iufgF-0005Do-MP for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 16:50:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iufgD-0002lP-25 for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 16:50:05 +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 1iufgC-0002k6-Ma for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 16:50:04 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iufg9-00044d-8b for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 16:50:03 +0000 Received: by mail-qt1-x841.google.com with SMTP id j5so2943497qtq.9 for ; Thu, 23 Jan 2020 08:50:00 -0800 (PST) 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=0tMEOx3Fo6kPHgK8ad7XNtOmmbgtxHPFDHJEMWOIk+A=; b=E9X/otZCBvqlpuBa2kB5jurdH7HhQ+3EE+afZuT4Zys2CxqR/V94i4fIhlB8JqrKRA jVfkyEZYyJyBuJY/84xHUKh8atHmh8JuF2oCoR2Tj2hC5C4ITMtPKhMyGKGQ/+bKpJQc zytxHWBH3XVvXxBsez8elIvjR38zR+gLiJ5xkAmzrGTSNxOkbNVdf1UtsyUjh33uy/ld YSeXxabd/ofaVplt5r6MNomkj5Ow4CtjbMB7uio6B0Rgj9UbZxQjIRd0dij7xJVZLhqO lk2KY4M74yGUTc2TlsA4lQVak5S0SSSrSjHt4XUVi3S9waTtbfAnIfvsH6Q2rribE5hL LLwQ== 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=0tMEOx3Fo6kPHgK8ad7XNtOmmbgtxHPFDHJEMWOIk+A=; b=rexAvJN+fHY2g0P2cQkR5NRbtpRgyaxTYvZqnL6qpj5jEF+FNH1MpLGGqE8JiekW9H MwxJukcOzWiOK29uDdHab1VDjDO4NJK4ot+JOw5TFevHxKAD3/wDO6I/NMCrp+cSBg4r HetmSRoTzwIy5zeg1TurEytewN4Pw4aMgEJ42vjB5laBVHmEbTYX38z0cNKzKwcxWfHA bPkon1n26BnIJAVLYtMWx0G0KXRhXpPFdULj0BIDx65XKR/rXTW7ZGdbrrkS5Cw7sHRs vA+RosyAdEoy4Qqwj+fxYIkNVxAH1mr+3ACMXY39XdBgYvDel1IbpHkK9EFm1i7moRxd UoDw== X-Gm-Message-State: APjAAAX81g3r8BI8nwxQdU2EdLWeayxtmWzPvGbGCqGnezJHkyCnnWcJ Iqysg9J2Bc4fKu2rXeF8pCNsFg== X-Google-Smtp-Source: APXvYqyhO/mFxbPMENGzgHy1zXuo3CfdsLu6IuNKaPqESGioFRBaOUbBlvNkwvehqDci15bqNmuFPQ== X-Received: by 2002:ac8:6784:: with SMTP id b4mr16660946qtp.27.1579798199255; Thu, 23 Jan 2020 08:49:59 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([179.56.96.77]) by smtp.gmail.com with ESMTPSA id f4sm1121833qka.89.2020.01.23.08.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 08:49:58 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 9E6DB300A9E; Thu, 23 Jan 2020 13:49:55 -0300 (-03) Date: Thu, 23 Jan 2020 13:49:55 -0300 From: Alvaro Herrera To: Tom Lane Cc: Arthur Zakirov , Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha , Tomas Vondra , PostgreSQL Hackers Subject: Re: Allow to_date() and to_timestamp() to accept localized names Message-ID: <20200123164955.GA23074@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <11266.1579796123@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jan-23, Tom Lane wrote: > That particular case could be improved by stopping at a dash ... but > since this code is also used to match strings like "A.M.", we can't > just exclude punctuation in general. Breaking at whitespace seems > like a reasonable compromise. Yeah, and there are cases where dashes are used in names -- browsing through glibc for example I quickly found Akan, for which the month names are: mon "Sanda-ppn";/ "Kwakwar-gyefuo";/ "Ebw-benem";/ and so on. Even whitespace is problematic for some languages, such as Afan, mon "Qunxa Garablu";/ "Naharsi Kudo";/ "Ciggilta Kudo";/ (etc) but I think whitespace-splitting is going to be more comprehensible in the vast majority of cases, even if not perfect. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services