Re: Support for jsonpath .datetime() method

From: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Liudmila Mantrova <l(dot)mantrova(at)postgrespro(dot)ru>, Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com>
Subject: Re: Support for jsonpath .datetime() method
Date: 2019-09-27 14:25:54
Message-ID: d9244568-08bb-5dcf-db25-540412e2e61f@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25.09.2019 22:55, Alexander Korotkov wrote:

> On Mon, Sep 23, 2019 at 10:05 PM Alexander Korotkov
> <a(dot)korotkov(at)postgrespro(dot)ru> wrote:
>> I've reordered the patchset. I moved the most debatable patch, which
>> introduces RRRR and RR and changes parsing of YYY, YY and Y to the
>> end. I think we have enough of time in this release cycle to decide
>> whether we want this.
>>
>> Patches 0001-0005 looks quite mature for me. I'm going to push this
>> if no objections. After pushing them, I'm going to start discussion
>> related to RR, YY and friends in separate thread.
> Pushed. Remaining patch is attached. I'm going to start the separate
> thread with its detailed explanation.

Attached patch with refactoring of compareDatetime() according
to the complaints of Tom Lane in [1]:
 * extracted four subroutines for type conversions
 * extracted subroutine for error reporting
 * added default cases to all switches
 * have_error flag is expected to be not-NULL always
 * fixed errhint() message style

[1] https://www.postgresql.org/message-id/32308.1569455803%40sss.pgh.pa.us

--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0001-Refactor-jsonpath-s-compareDatime.patch text/x-patch 17.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-27 14:28:18 Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)
Previous Message Michael Paquier 2019-09-27 14:20:58 Re: PostgreSQL12 and older versions of OpenSSL