On Sat, 2005-03-26 at 15:56 -0800, Josh Berkus wrote:
> > On Sat, Mar 26, 2005 at 02:04:14PM -0800, Josh Berkus wrote:
> > > SELECT to_char( INTERVAL '43 hours 20 minutes', 'MI' ) || ' min';
> > > 2600 min
> > Hmm, what if you wanted more than one literal string? Say "1 mon 3
> > days" ... your concatenation idea wouldn't work. ISTM the format string
> > should allow unconverted literals, so you would use
> > SELECT to_char( INTERVAL '43 hours 20 minutes', 'MI min' );
> Hmmm, good point.
> Question: how does to_char tell the difference between a code ("MI") and a
> code which is also part of a word? ("MIN").
It's pretty simple. to_char(..., 'MI "min"'). It's already supported by
to_char() format parser.
I think to_char(interval) should be support split interval to more
to_char(INTERVAL '1d 3h 65s', 'HHh MIm SSs') ---> '27h 1m 5s'
Well, I'm going to check how difficult will be implement correct to_char
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
In response to
pgsql-hackers by date
|Next:||From: Karel Zak||Date: 2005-03-27 11:03:33|
|Subject: Re: Bug 1500|
|Previous:||From: Michael Fuhr||Date: 2005-03-27 07:09:58|
|Subject: Re: i want to find|