On Sun, 2005-03-27 at 11:43 -0800, Josh Berkus wrote:
> Tom, Karel,
>
> > Hmm, if we want to support conversion like:
> > '43 hours 20 minutes' --> 'MI min'
> > how we should work with calendar INTERVAL units? For example 'month'?
> > '1 month 1 day' --> 'D days'
> > I think answer sho
Tom, Karel,
> Hmm, if we want to support conversion like:
> ÂÂ'43 hours 20 minutes' --> 'MI min'
> how we should work with calendar INTERVAL units? For example 'month'?
> ÂÂ'1 month 1 day' --> 'D days'
> I think answer should be error message: "missing calendar unit 'month'
> in output for
Karel Zak <[EMAIL PROTECTED]> writes:
> Hmm, if we want to support conversion like:
> '43 hours 20 minutes' --> 'MI min'
> how we should work with calendar INTERVAL units? For example 'month'?
> '1 month 1 day' --> 'D days'
> I think answer should be error message: "missing calendar uni
On Sun, 2005-03-27 at 12:03 +0200, Karel Zak wrote:
> On Sat, 2005-03-26 at 15:56 -0800, Josh Berkus wrote:
> > Alvaro,
> >
> > > 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,
On Sat, 2005-03-26 at 15:56 -0800, Josh Berkus wrote:
> Alvaro,
>
> > 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
> >
Alvaro,
> 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 stri
Alvaro Herrera <[EMAIL PROTECTED]> writes:
> ... ISTM the format string
> should allow unconverted literals, so you would use
> SELECT to_char( INTERVAL '43 hours 20 minutes', 'MI min' );
... which to_char can do already, IIRC. The rewrite should define a new
set of format substitution codes, b
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 unc
This has my vote
Lorne
In <[EMAIL PROTECTED]>, on 03/26/05
at 02:04 PM, Josh Berkus said:
>Karel,
>> > Yeah. áKarel Zak, who wrote that code, is convinced we should remove it,
>> > but I don't think anyone else is ...
>>
>> áI think I was Peter and Josh Berkus who convinced me that t
Karel,
> > Yeah. ÂKarel Zak, who wrote that code, is convinced we should remove it,
> > but I don't think anyone else is ...
>
> ÂI think I was Peter and Josh Berkus who convinced me that the code is
> bed. "we should remove..." is opinion only...
I certainly didn't recommend removing it before w
On Fri, Mar 25, 2005 at 12:53:53 -0800,
Steve Crawford <[EMAIL PROTECTED]> wrote:
>
> 2) If so, what is the replacement?
You should be able to use EXTRACT, some math to do your own formatting.
For common operations you can define SQL functions to do what you want.
Having to_char(interval) may b
On Sat, 2005-03-26 at 02:32 +0100, Karel Zak wrote:
> On Fri, 2005-03-25 at 20:03 -0500, Tom Lane wrote:
> > Steve Crawford <[EMAIL PROTECTED]> writes:
> > > In digging around I discovered that it appears a decision was made to
> > > remove to_char(interval) at the 8.1 release but I've been unable
On Fri, 2005-03-25 at 20:03 -0500, Tom Lane wrote:
> Steve Crawford <[EMAIL PROTECTED]> writes:
> > In digging around I discovered that it appears a decision was made to
> > remove to_char(interval) at the 8.1 release but I've been unable to
> > find the replacement for this functionality. This a
On Fri, 2005-03-25 at 15:33 -0500, Tom Lane wrote:
> Lyubomir Petrov <[EMAIL PROTECTED]> writes:
> > I have found what is causing the crash described in Bug 1500. Now I
> > would like to fix it, but need opinions about what is the correct behaviour.
>
> Yeah, I just came to the same conclusion a
Steve Crawford <[EMAIL PROTECTED]> writes:
> In digging around I discovered that it appears a decision was made to
> remove to_char(interval) at the 8.1 release but I've been unable to
> find the replacement for this functionality. This alarms me.
Yeah. Karel Zak, who wrote that code, is convin
Tom Lane wrote:
Lyubomir Petrov <[EMAIL PROTECTED]> writes:
I have found what is causing the crash described in Bug 1500. Now I
would like to fix it, but need opinions about what is the correct behaviour.
Yeah, I just came to the same conclusion a little while ago:
http://archives.postgres
Steve Crawford wrote:
So this bug actually brings the issue of interval to_char()
formatting. Opinions?
In digging around I discovered that it appears a decision was made to
remove to_char(interval) at the 8.1 release but I've been unable to
find the replacement for this functionality. This
> So this bug actually brings the issue of interval to_char()
> formatting. Opinions?
In digging around I discovered that it appears a decision was made to
remove to_char(interval) at the 8.1 release but I've been unable to
find the replacement for this functionality. This alarms me.
Given the
Lyubomir Petrov <[EMAIL PROTECTED]> writes:
> I have found what is causing the crash described in Bug 1500. Now I
> would like to fix it, but need opinions about what is the correct behaviour.
Yeah, I just came to the same conclusion a little while ago:
http://archives.postgresql.org/pgsql-hacker
Hi,
I have found what is causing the crash described in Bug 1500. Now I
would like to fix it, but need opinions about what is the correct behaviour.
The bug can be easily duplicated when formatting interval in to_char()
using 'Mon' or 'Month' in the format string.
select to_char(now() - '200110
20 matches
Mail list logo