pgsql: Implement parse_datetime() function

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Implement parse_datetime() function
Date: 2019-09-25 19:52:13
Message-ID: E1iDDKf-0008VQ-PW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2019-09-25 21:05:58 Re: pgsql: Implement jsonpath .datetime() method
Previous Message Alvaro Herrera 2019-09-25 19:20:57 pgsql: Update expected output for dummy_index_am