pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Oleg Bartunov <obartunov@gmail.com>
Subject: Re: jsonpath
Date: Wed, 17 Jan 2018 16:01:07 -0500
Message-ID: <f0b44fe7-d47a-eff2-592c-d9dbe4a63f75@2ndQuadrant.com> (raw)
In-Reply-To: <7b4b8973-43f5-71c5-bf86-51cb5798dd88@2ndQuadrant.com>
References: <fcc6fc6a-b497-f39a-923d-aa34d0c588e8@2ndQuadrant.com>
	<CAFj8pRAhPnD=sPu-E=rwfcbgeZ8PLczYEzCsvgNYLtybSy9-=g@mail.gmail.com>
	<9f845926-0d7d-7c4d-75e3-b1e921a1677a@2ndQuadrant.com>
	<CAFj8pRBCvhgLCROfSCPGmwWZpSY+dKQN4O9xRe+1-wjBiXiHkA@mail.gmail.com>
	<bad98003-31ba-523e-d76c-3679efb2e732@2ndQuadrant.com>
	<CAFj8pRDWSCWd1JxA8srwbfL5cPgz2b5minq2UsM=cxgsFF-orw@mail.gmail.com>
	<48f13b75-0be7-c356-ff26-1db743add56e@postgrespro.ru>
	<7b4b8973-43f5-71c5-bf86-51cb5798dd88@2ndQuadrant.com>



On 01/15/2018 07:24 PM, Andrew Dunstan wrote:
>
> On 01/10/2018 05:42 PM, Nikita Glukhov wrote:
>> Attached new 8th version of jsonpath related patches. Complete
>> documentation is still missing.
>>
>> The first 4 small patches are necessary datetime handling in jsonpath:
>> 1. simple refactoring, extracted function that will be used later in
>> jsonpath
>> 2. throw an error when the input or format string contains trailing
>> elements
>> 3. avoid unnecessary cstring to text conversions
>> 4. add function for automatic datetime type recognition by the
>> presence of formatting components
>>
>> Should they be posted in a separate thread?
>>
>
> The first of these refactors the json/jsonb timestamp formatting into a
> single function, removing a lot of code duplication. The involves
> exposing time2tm() and timetz2tm(). I don't think that's a tragedy, so
> unless there is any objection I propose to commit it shortly.
>
> The next three expose a bit more of the date/time API. I'm still
> reviewing those.
>


I have committed the first of these patches.

I have reviewed the next three, and I think they are generally good.
There is no real point in committing them ahead of the jsonpath patch
since there would be no point in having them at all but for that patch.

Note that these do export the following hitherto internal bits of the
datetime functionality:

    tm2time
    tm2timetz
    AdjustTimeForTypmod
    AdjustTimestampForTypmod

Moving on to review the main jsonpath patch.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (198+ messages)  latest in thread

Message-ID: <f0b44fe7-d47a-eff2-592c-d9dbe4a63f75@2ndQuadrant.com>
Permalink:  ../f0b44fe7-d47a-eff2-592c-d9dbe4a63f75@2ndQuadrant.com/
Also on:    postgresql.org/message-id/f0b44fe7-d47a-eff2-592c-d9dbe4a63f75@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: andrew.dunstan@2ndquadrant.com, n.gluhov@postgrespro.ru, pavel.stehule@gmail.com, obartunov@gmail.com
  Subject: Re: jsonpath
  In-Reply-To: <f0b44fe7-d47a-eff2-592c-d9dbe4a63f75@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