Re: Allow to_date() and to_timestamp() to accept localized names - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: Allow to_date() and to_timestamp() to accept localized names
Date
Msg-id CAC+AXB0x7juj7RVjMj0LV95=Uo=EgRJFmLFBbLRodObr4yJJag@mail.gmail.com
Whole thread Raw
In response to Re: Allow to_date() and to_timestamp() to accept localized names  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
List pgsql-hackers
On Thu, Aug 22, 2019 at 9:38 PM Juan José Santamaría Flecha
<juanjo.santamaria@gmail.com> wrote:
>
> >
> > Going through the current items in the wiki's todo list, I have been
> > looking into: "Allow to_date () and to_timestamp () to accept
> > localized month names".
> >
>
> I have gone through a second take on this, trying to give it a better
> shape but it would surely benefit from some review, so I will open an
> item in the commitfest.

For reviewers, the current aproach for this patch is:

Break seq_search() into two functions:
  * seq_search_sqlascii() that supports seq_search() current usage.
  * seq_search_localized() similar to the previous but supports multibyte input.
To avoid code duplication most of current seq_search() logic has been
moved to a new function str_compare().
from_char_seq_search() is now responsible to choose between
seq_search_sqlascii() or seq_search_localized().
Also, since localized names is not a null terminated array,
seq_search() now receives the dimension as input and terminating nulls
have been removed from static arrays.

The commitfest item is:

https://commitfest.postgresql.org/24/2255/

Regards,

Juan José Santamaría Flecha



pgsql-hackers by date:

Previous
From: Alexander Kukushkin
Date:
Subject: Statement timeout in pg_rewind
Next
From: Masahiko Sawada
Date:
Subject: Re: Comment in ginpostinglist.c doesn't match code