forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd677550
committed
Allow to_date/to_timestamp to recognize non-English month/day names.
to_char() has long allowed the TM (translation mode) prefix tospecify output of translated month or day names; but that prefixhad no effect in input format strings. Now it does. to_date()and to_timestamp() will now recognize the same month or day namesthat to_char() would output for the same format code. Matching iscase-insensitive (per the active collation's notion of what thatmeans), just as it has always been for English month/day nameswithout the TM prefix.(As per the discussion thread, there are lots of cases that thisfeature will not handle, such as alternate day names. But beingable to accept what to_char() will output seems useful enough.)In passing, fix some shaky English and violations of messagestyle guidelines in jsonpath errors for the .datetime() method,which depends on this code.Juan José Santamaría Flecha, reviewed and modified by me,with other commentary from Alvaro Herrera, Tomas Vondra,Arthur Zakirov, Peter Eisentraut, Mark Dilger.Discussion:https://postgr.es/m/CAC+AXB3u1jTngJcoC1nAHBf=M3v-jrEfo86UFtCqCjzbWS9QhA@mail.gmail.com1 parent1810ca1 commitd677550
File tree
9 files changed
+221
-54
lines changed- doc/src/sgml
- src
- backend/utils/adt
- include/utils
- test/regress
- expected
- sql
9 files changed
+221
-54
lines changedLines changed: 21 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5968 | 5968 |
| |
5969 | 5969 |
| |
5970 | 5970 |
| |
5971 |
| - | |
| 5971 | + | |
5972 | 5972 |
| |
5973 | 5973 |
| |
5974 | 5974 |
| |
| |||
5999 | 5999 |
| |
6000 | 6000 |
| |
6001 | 6001 |
| |
6002 |
| - | |
6003 |
| - | |
6004 |
| - | |
| 6002 | + | |
| 6003 | + | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
| 6007 | + | |
| 6008 | + | |
| 6009 | + | |
| 6010 | + | |
| 6011 | + | |
| 6012 | + | |
| 6013 | + | |
| 6014 | + | |
| 6015 | + | |
6005 | 6016 |
| |
6006 | 6017 |
| |
6007 | 6018 |
| |
| |||
12824 | 12835 |
| |
12825 | 12836 |
| |
12826 | 12837 |
| |
12827 |
| - | |
12828 |
| - | |
12829 |
| - | |
12830 |
| - | |
12831 |
| - | |
12832 |
| - | |
| 12838 | + | |
| 12839 | + | |
| 12840 | + | |
| 12841 | + | |
| 12842 | + | |
| 12843 | + | |
12833 | 12844 |
| |
12834 | 12845 |
| |
12835 | 12846 |
| |
|
0 commit comments
Comments
(0)