pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Implement parse_datetime() function
Date: Wed, 25 Sep 2019 19:52:13 +0000
Message-ID: <E1iDDKf-0008VQ-PW@gemulon.postgresql.org> (raw)

Implement parse_datetime() function

This commit adds parse_datetime() function, which implements datetime
parsing with extended features demanded by upcoming jsonpath .datetime()
method:

 * Dynamic type identification based on template string,
 * Support for standard-conforming 'strict' mode,
 * Timezone offset is returned as separate value.

Extracted from original patch by Nikita Glukhov, Teodor Sigaev, Oleg Bartunov.
Revised by me.

Discussion: https://postgr.es/m/fcc6fc6a-b497-f39a-923d-aa34d0c588e8%402ndQuadrant.com
Discussion: https://postgr.es/m/CAPpHfdsZgYEra_PeCLGNoXOWYx6iU-S3wF8aX0ObQUcZU%2B4XTw%40mail.gmail.com
Author: Nikita Glukhov, Teodor Sigaev, Oleg Bartunov, Alexander Korotkov
Reviewed-by: Anastasia Lubennikova, Peter Eisentraut

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/66c74f8b6e347ba5830bf06468bef8081601c187

Modified Files
--------------
src/backend/utils/adt/date.c       |  11 +-
src/backend/utils/adt/formatting.c | 291 ++++++++++++++++++++++++++++++++++++-
src/include/utils/date.h           |   3 +
src/include/utils/formatting.h     |   3 +
4 files changed, 296 insertions(+), 12 deletions(-)



Message-ID: <E1iDDKf-0008VQ-PW@gemulon.postgresql.org>
Permalink:  ../E1iDDKf-0008VQ-PW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iDDKf-0008VQ-PW@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org
  Subject: Re: pgsql: Implement parse_datetime() function
  In-Reply-To: <E1iDDKf-0008VQ-PW@gemulon.postgresql.org>
  References: <E1iDDKf-0008VQ-PW@gemulon.postgresql.org>

* 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