pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Stas Kelvich <s.kelvich@postgrespro.ru>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: David Steele <david@pgmasters.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Oleg Bartunov <obartunov@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Subject: Re: jsonpath
Date: Sat, 5 Jan 2019 15:21:03 +0100
Message-ID: <787430e1-da7d-6180-6ce6-32bd4b0c1ae0@2ndquadrant.com> (raw)
In-Reply-To: <CAPpHfdvVyXsD1gSwVB7A2C07Mx_6XZOOpEBqO_Le11mYJyq8YQ@mail.gmail.com>
References: <CAA8=A796mY7kJdKARt7B+faW70-c8mRh+Ff_joBJ+NyCFLv3Gg@mail.gmail.com>
	<892ae4c4-e549-ab21-c57c-37c5fd47fda0@pgmasters.net>
	<8dd1cd76-cd4e-9be7-9515-ef0b8b21cb67@postgrespro.ru>
	<CAEepm=0jJ4fkEWLHc2Rqt5F4Und6qd+60pxFQmCnbf0nYYjrcg@mail.gmail.com>
	<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>
	<CAPpHfdvVyXsD1gSwVB7A2C07Mx_6XZOOpEBqO_Le11mYJyq8YQ@mail.gmail.com>

On 1/5/19 1:11 AM, Alexander Korotkov wrote:
> On Tue, Dec 4, 2018 at 2:23 AM Nikita Glukhov <n.gluhov@postgrespro.ru> 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




view thread (198+ messages)  latest in thread

Message-ID: <787430e1-da7d-6180-6ce6-32bd4b0c1ae0@2ndquadrant.com>
Permalink:  ../787430e1-da7d-6180-6ce6-32bd4b0c1ae0@2ndquadrant.com/
Also on:    postgresql.org/message-id/787430e1-da7d-6180-6ce6-32bd4b0c1ae0@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, a.korotkov@postgrespro.ru, n.gluhov@postgrespro.ru, michael@paquier.xyz, s.kelvich@postgrespro.ru, thomas.munro@enterprisedb.com, david@pgmasters.net, tgl@sss.pgh.pa.us, andrew.dunstan@2ndquadrant.com, robertmhaas@gmail.com, obartunov@gmail.com, pavel.stehule@gmail.com
  Subject: Re: jsonpath
  In-Reply-To: <787430e1-da7d-6180-6ce6-32bd4b0c1ae0@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox