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 1gfmpH-0000Vz-NM for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Jan 2019 14:21:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gfmpE-0000QE-1O for pgsql-hackers@arkaria.postgresql.org; Sat, 05 Jan 2019 14:21:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfmpD-0000Q7-GB for pgsql-hackers@lists.postgresql.org; Sat, 05 Jan 2019 14:21:19 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfmp5-00005y-TE for pgsql-hackers@postgresql.org; Sat, 05 Jan 2019 14:21:18 +0000 Received: by mail-wr1-x444.google.com with SMTP id 96so39001567wrb.2 for ; Sat, 05 Jan 2019 06:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1tw2q5+SgNmvfY1Pn8KXzV/uTOhrwWRmxOcL6K8a8aY=; b=PhEDajScbkeXibwbHIC/4oRmyNkcfxAoDHk2rqHbzRxBTbuZqhyREWpzlFsAy8bnwq zUapRhRholOt9X7JvfOubKLsdxkr6Zt1EqqJf89FTr38Yk+63Ng+/v+cu9d4X8kNsRtO 99MEZuaY0nwCnUqIdX1SDvR2peYP9/0paqTZAcRkLO0bJJKBjcWnns/zBtus+VD6OHWO KyltIgrXrxfxM0rmDFrpnmdIC+RDeJowJRn7hx0bb+mVf/g3JdDYlk/0ry7xSQ9JzPSU //+oUhIFE6jGTuD/yofHm0n4WiVCt1+Ba3/M0UIHaSEkSt/2IA/3frbtqqnawUlJRlJ2 TzeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1tw2q5+SgNmvfY1Pn8KXzV/uTOhrwWRmxOcL6K8a8aY=; b=D+FBln7nbt4xdlczBShgiwGrFSlyYK3AJlAx8VNzo7pJla3Qosg19VYBSggPU/OjTF oJ9P4nPMOQY+tqiC/L4oSV1i+nM+02+oR7I5H9Ast3974OxnXq5IdFLU3+wgUEUaNVJT XGviXtQIdnAHWhY1aO/2/3xi6Qcogaz/dOL7csbqRc0nbQlJ4CJ94eMxWxrOa11yYna1 11KlPhvZ9ywoUDaSOWeL6v9Cf9TDdbOw4ZFz6t9koQ/wWtrPjhYhipaUDe8w7OYfMboE aK3QP74LjzImc4BYbMB5na7vT0Iw7fNQstXCFTxJguZQ3N7Jp7TKrZ7DdOzCgEZ8647P oQTQ== X-Gm-Message-State: AJcUukdSBETR2xVrxYjwY5g3U8mk2U/6e1+jCCOmPlmATkNvjeOWooZV D7M9oSfSDqQqIzagKr4TNojq2w== X-Google-Smtp-Source: ALg8bN68qFMMJdYeb7laZYkBLp/ExZgYAIiSzBp7je/sr3e/opswL2vkRAdmFVVRNL2rM2bCZX0Jng== X-Received: by 2002:adf:9bda:: with SMTP id e26mr44765507wrc.295.1546698068727; Sat, 05 Jan 2019 06:21:08 -0800 (PST) Received: from [10.137.2.19] (ip-86-49-251-50.net.upcbroadband.cz. [86.49.251.50]) by smtp.gmail.com with ESMTPSA id k128sm4841488wmd.37.2019.01.05.06.21.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 06:21:07 -0800 (PST) Subject: Re: jsonpath To: Alexander Korotkov , Nikita Glukhov Cc: Michael Paquier , Stas Kelvich , PostgreSQL-development , Thomas Munro , David Steele , Tom Lane , Andrew Dunstan , Robert Haas , Oleg Bartunov , Pavel Stehule References: <892ae4c4-e549-ab21-c57c-37c5fd47fda0@pgmasters.net> <8dd1cd76-cd4e-9be7-9515-ef0b8b21cb67@postgrespro.ru> <3bc15ece-5219-e4ca-0b5c-fcd2b276aa26@postgrespro.ru> <4e2aaa88-3bbf-6af3-8dad-d5687fbec89f@postgrespro.ru> <42272F2B-16D1-43D6-B22F-273AE1DA6D6B@postgrespro.ru> <715c1c44-9bb9-6b9f-7c59-61b66578f107@postgrespro.ru> <20181002023317.GI11712@paquier.xyz> <063560d8-bc0b-945b-8796-5ba998d79dc6@2ndquadrant.com> <9a175c2d-b0a9-475f-078b-febc185282ff@postgrespro.ru> <86a0e7df-443b-3f20-70b0-655a1f5dcbb2@2ndquadrant.com> <2265b7fe-3b0e-c437-fe15-ac1807319b73@2ndquadrant.com> <64e3108c-888f-092e-30a2-58dea157707e@postgrespro.ru> <43e52ed7-9c21-db2c-693a-9245f9e8ce2a@2ndquadrant.com> <38018365-5793-2827-e3c1-5a3b259fb6ae@postgrespro.ru> From: Tomas Vondra Message-ID: <787430e1-da7d-6180-6ce6-32bd4b0c1ae0@2ndquadrant.com> Date: Sat, 5 Jan 2019 15:21:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/5/19 1:11 AM, Alexander Korotkov wrote: > On Tue, Dec 4, 2018 at 2:23 AM Nikita Glukhov wrote: >> 2) We define both DCH_FF# and DCH_ff#, but we never ever use the >> lower-case version. Heck, it's not mentioned even in DCH_keywords, which >> does this: >> >> ... >> {"FF1", 3, DCH_FF1, false, FROM_CHAR_DATE_NONE}, /* F */ >> ... >> {"ff1", 3, DCH_FF1, false, FROM_CHAR_DATE_NONE}, /* F */ >> ... >> >> Compare that to DCH_DAY, DCH_Day and DCH_day, mapped to "DAY", "Day" and >> "day". >> >> Yes, "ff#" are mapped to DCH_FF# like "mi" is mapped DCH_MI. >> >> "Day", "day" are not mapped to DCH_DAY because they determine letter case in the >> output, but "ff1" and "FF#" output contains only digits. > > Right, DCH_poz is also offset in DCH_keywords array. So, if array has > an entry for "ff1" then enum should have a DCH_ff1 member in the same > position. > I guess my question is why we define DCH_ff# at all, when it's not mapped in DCH_keywords? ISTM we could simply leave them out of all the arrays, no? Of course, this is not specific to this patch, as it applies to pre-existing items (like DCH_mi). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services