Re: Allow to_date() and to_timestamp() to accept localized names

Поиск
Список
Период
Сортировка
Искать
От
Juan José Santamaría Flecha
Тема
Re: Allow to_date() and to_timestamp() to accept localized names
Дата
Msg-id
CAC+AXB2uTOaPQ2cxvjgcGF3kRVCucftFwchZdQ5n_F0R+P7KwA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Arthur Zakirov <zaartur@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Arthur Zakirov <zaartur@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Mark Dilger <mark.dilger@enterprisedb.com>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Mark Dilger <mark.dilger@enterprisedb.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Mark Dilger <mark.dilger@enterprisedb.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names James Coleman <jtc331@gmail.com>
Re: Allow to_date() and to_timestamp() to accept localized names Mark Dilger <mark.dilger@enterprisedb.com>
Re: Allow to_date() and to_timestamp() to accept localized names Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Tom Lane <tgl@sss.pgh.pa.us>
Re: Allow to_date() and to_timestamp() to accept localized names Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>


On Tue, Jan 28, 2020 at 4:06 PM Mark Dilger <mark.dilger@enterprisedb.com> wrote:

I’m not insisting, just asking about the design.  If it only works with one name supported per weekday per language, and per month per language, I’m not going to object.  I was just curious if you were going to support multiple names anyway, and if that made the question about the Greek case folding less pressing.


This patch targets to do something symmetrical to to_char(), which will just return a single value.

The issue with the greek locale is that it cannot hold this equivalent behaviour, as in:

postgres=# select to_date(to_char(now(), 'TMMONTH'), 'TMMONTH');
ERROR:  invalid value "ΙΑΝΟΥΆΡΙΟΣ" for "MONTH"

Because of the particular behaviour sigma (Σσς) casing has, which is also user visible with a lower().
 

>      %E* %O*
>            POSIX locale extensions.  The sequences %Ec %EC %Ex %EX %Ey %EY %Od %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide alternate representations.
>
>            Additionally %OB implemented to represent alternative months names (used standalone, without day mentioned).

This is the part I haven’t played with, but it sounds like it can handle at least one alternate name.  Perhaps you can get the alternates this way?


This looks like a POSIX feature that some systems might not like (Windows [1]). But if this is something that the patch should aim to, I am fine with a RWF and give it another try in the future.


Regards,

Juan José Santamaría Flecha 
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Tomas Vondra
Дата:
FAQ