Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-10 Thread Gevik Babakhani
I can't remember anyone asking for more sophisticated solutions so it seems implementing #1 at this point is the best approach. OK. Then I'll start working on the first approach. Regards, Gevik. ---(end of broadcast)--- TIP 7: You can

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-08 Thread Bruce Momjian
Gevik Babakhani wrote: Surely it should be the inverse of the solution for output, eg TMMon selects localized input. After some investigation in how gettext works, I would like to have your opinion about how to implement this TODO item. Starting with TO_CHAR: When the TM

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-07 Thread Gevik Babakhani
] TODO item:Allow to_date() and to_timestamp() accept localized month names Alvaro Herrera wrote: Nevertheless, I think there's something interesting missing here, which is a sort of strftime's %c format string. I think the Oracle way to do that would be to_char() with one argument

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-05 Thread Gevik Babakhani
@postgresql.org Subject: Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names Gevik Babakhani [EMAIL PROTECTED] writes: Surely it should be the inverse of the solution for output, eg TMMon selects localized input. Of cource. But how would TM enforce

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-04 Thread Tom Lane
Gevik Babakhani [EMAIL PROTECTED] writes: What do we think about a solution that would be like: 1. Add an extra (optional) parameter to to_date and to_timestamp which would indicate the locale we are trying to parse. Surely it should be the inverse of the solution for output, eg TMMon

[HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-04 Thread Gevik Babakhani
Hi, I would like to start a discussion for a solution regarding this item. At this moment these functions only accept English month/day names due formatting.c:172:months_full[] and datetime.c:53-58 months[], days[]. The values are predetermined. (hardcoded sounds bahhh...) What do we think

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-04 Thread Gevik Babakhani
Surely it should be the inverse of the solution for output, eg TMMon selects localized input. Of cource. But how would TM enforce a localized formatting. (perhaps I am off 2:10 am...) Lets say I have en_US database but the dates I am trying to format is nl_NL. If I am not mistaking SET

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-04 Thread Tom Lane
Gevik Babakhani [EMAIL PROTECTED] writes: Surely it should be the inverse of the solution for output, eg TMMon selects localized input. Of cource. But how would TM enforce a localized formatting. (perhaps I am off 2:10 am...) Lets say I have en_US database but the dates I am trying to

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-04 Thread Alvaro Herrera
Tom Lane wrote: Gevik Babakhani [EMAIL PROTECTED] writes: Surely it should be the inverse of the solution for output, eg TMMon selects localized input. Of cource. But how would TM enforce a localized formatting. (perhaps I am off 2:10 am...) Lets say I have en_US database but

Re: [HACKERS] TODO item:Allow to_date() and to_timestamp() accept localized month names

2008-02-04 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Nevertheless, I think there's something interesting missing here, which is a sort of strftime's %c format string. Perhaps, but let us please not cram random non-Oracle-compatible stuff into to_date/to_char. Those have a charter already.