Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Heikki Linnakangas
David Fetter wrote: > Dunno about the file, but the whole question of date and time handling > has been tricky and complicated for all of human history. Yeah, the rules on how to parse the pattern and how to use it to interpret/format dates are indeed very complex. And this was a particularly obsc

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Tom Lane
David Fetter writes: > On Mon, Jul 6, 2009 at 7:20 PM, Bruce Momjian wrote: >>> I feel like someone should take a flame-thrower to that file. > Dunno about the file, but the whole question of date and time handling > has been tricky and complicated for all of human history. Yeah. I think about

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread David Fetter
On Mon, Jul 06, 2009 at 02:30:12PM -0400, Bruce Momjian wrote: > Greg Stark wrote: > > On Mon, Jul 6, 2009 at 7:20 PM, Bruce Momjian wrote: > > > I feel like someone should take a flame-thrower to that file. > > > ?;-) > > > > If you were half the man you used to be would you? > > I thought we ha

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Bruce Momjian
Greg Stark wrote: > On Mon, Jul 6, 2009 at 7:20 PM, Bruce Momjian wrote: > > I feel like someone should take a flame-thrower to that file. ?;-) > > If you were half the man you used to be would you? I thought we had flame-throwed it a couple of of times, with overhauls, but obviously we didn't do

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 7:20 PM, Bruce Momjian wrote: > I feel like someone should take a flame-thrower to that file.  ;-) If you were half the man you used to be would you? -- greg http://mit.edu/~gsstark/resume.pdf -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make change

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Bruce Momjian
David Fetter wrote: > On Mon, Jul 06, 2009 at 01:53:28PM -0400, Bruce Momjian wrote: > > Tom Lane wrote: > > > Heikki Linnakangas writes: > > > > Looking at the code, that looks like an oversight and the fix is > > > > trivial: > > > > > > Yeah, I think you are right. > > > > > > > But given tha

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread David Fetter
On Mon, Jul 06, 2009 at 01:53:28PM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > Heikki Linnakangas writes: > > > Looking at the code, that looks like an oversight and the fix is > > > trivial: > > > > Yeah, I think you are right. > > > > > But given that it has been like that at least back

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Bruce Momjian
Tom Lane wrote: > Heikki Linnakangas writes: > > Looking at the code, that looks like an oversight and the fix is trivial: > > Yeah, I think you are right. > > > But given that it has been like that at least back to 8.0 which is the > > oldest version I have installed right now: does anyone see

Re: [BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Tom Lane
Heikki Linnakangas writes: > Looking at the code, that looks like an oversight and the fix is trivial: Yeah, I think you are right. > But given that it has been like that at least back to 8.0 which is the > oldest version I have installed right now: does anyone see a reason not > to fix that? +

[BUGS] TH to_char modifier doesn't work with HH12

2009-07-06 Thread Heikki Linnakangas
The uppercase 'TH' modifier is not working with HH12: template1=# select to_char('3-MAY-2007 2:34'::timestamptz,'FMHHTH" HOUR OF THE "FMDDTH" DAY WAS ILL-FATED'::text); to_char --- 2nd HOUR OF THE 3RD DAY WAS ILL-FATED (1 row) Looking at the c