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 1iqJID-0001B9-LN for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jan 2020 16:07:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iqJHD-0003e5-An for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jan 2020 16:06:15 +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 1iqJHC-0003cF-Tn for pgsql-hackers@lists.postgresql.org; Sat, 11 Jan 2020 16:06:15 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iqJH5-0004Vq-39 for pgsql-hackers@lists.postgresql.org; Sat, 11 Jan 2020 16:06:13 +0000 Received: by mail-wr1-x442.google.com with SMTP id b6so4567013wrq.0 for ; Sat, 11 Jan 2020 08:06:06 -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:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=uFMxfN+jT4NQ9VQg6xN74BuYLrcC5S4Hqxrd1579iYw=; b=cSZExeGeg9+Hvud19TEBhKZrpUUK+08wVtbj5l3Q5TUAz75mvf2DeQzHOfN7DRNW50 JLUo+rSNM52IAjZZ1LrShSYvLK5awTAAF7HgHMiXxTibgHKWIzqhP/wqQhOgkx3GuUDg 6PAjwPMNxhcsOK6IRb6SPPuXGdvSKTqkd5n2qZj6KRG/boM2xu9fibs+OD/eTJ6+jx7Y LncJK3MGQoe6jBlABICKQBk73mriLLBRPHO9Ok5QyHb975tkbbEaifxRl4ngooR8Anng ALEcUEfXaN3uc6/bs5tYletPLjnuL9tOxrZXzJZ6Zg8FGPIinTVXPgE9wyzTPSzCHI+U KFFw== 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:content-transfer-encoding :in-reply-to; bh=uFMxfN+jT4NQ9VQg6xN74BuYLrcC5S4Hqxrd1579iYw=; b=ltisxHNFNt91w2iOeZS9huiCA+KEcdHWK8pP3mFD6Sgavdh4MPEWc7vMAbQc8wyYTt T5S4w2bkuRkuxwgFxAAQoCPOLng3r9WjmOYjp4CbPr1GMdpzrs0hg7Tr6d9xq3uF2VIX 6RJwCmJyLtJTCCsd5U46dfgNzF1toAQnoQPNE5mjidiYaPN00f4h0IPEUuGS6uaWXD3h PhLsBcxCCb5XHuWpvWn1SwRIAkssp8xGyc8+JAw4Af3yPU8Qai0E/yXInB7tU6YQt4L2 bUM0DJL7qNSIHkY8me/q/6tkLHU3LB2jfE/Ucr8emESUnXdzGdXw+87wHdm/1uqp+/iN AkXA== X-Gm-Message-State: APjAAAXeGGFZPNhz2+KpMprmeTwxvfBwD8OmeMDv943CCHVmFCEN4+Ay FaEScS+UYwkHJexoLxSj4AsnFA== X-Google-Smtp-Source: APXvYqxSAPZP/kY8hBKYr4Wnu9d7JjiNhQ5pAJFvYkq3RBc5GjB6DlhPUA07srNybWxhPxhxs/8Urg== X-Received: by 2002:adf:e5cb:: with SMTP id a11mr9092633wrn.28.1578758764415; Sat, 11 Jan 2020 08:06:04 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id b10sm6956987wrt.90.2020.01.11.08.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2020 08:06:03 -0800 (PST) Date: Sat, 11 Jan 2020 17:06:02 +0100 From: Tomas Vondra To: Juan =?utf-8?B?Sm9zw6kgU2FudGFtYXLDrWE=?= Flecha Cc: Alvaro Herrera , PostgreSQL Hackers Subject: Re: Allow to_date() and to_timestamp() to accept localized names Message-ID: <20200111160602.4wwvyl7lo3oxoewf@development> References: <20190925195745.GA21894@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Sep 26, 2019 at 08:36:25PM +0200, Juan José Santamaría Flecha wrote: >On Wed, Sep 25, 2019 at 9:57 PM Alvaro Herrera wrote: >> >> This patch no longer applies. Can you please rebase? > >Thank you for the notification. > >The patch rot after commit 1a950f3, a rebased version is attached. > Thanks. I did a quick review of this patch, and I think it's almost RFC. I only found a couple of minor issue: - In func.sgml, it seems we've lost this bit: TM does not include trailing blanks. to_timestamp and to_date ignore the TM modifier. Does that mean the function no longer ignore the TM modifier? That would be somewhat problematic (i.e. it might break some user code). But looking at the code I don't see why the patch would have this effect, so I suppose it's merely a doc bug. - I don't think we need to include examples how to_timestmap ignores case, I'd say just stating the fact is clear enough. But if we want to have examples, I think we should not inline in the para but use the established pattern: Some examples: ... which is used elsewhere in the func.sgml file. - In formatting.c the "common/unicode_norm.h" should be right after includes from "catalog/" to follow the alphabetic order (unless there's a reason why that does not work). - I rather dislike the "dim" parameter name, because I immediately think "dimension" which makes little sense. I suggest renaming to "nitems" or "nelements" or something like that. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services